[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[2191] 2009-05-05 Pavel Roskin <address@hidden>
From: |
Pavel Roskin |
Subject: |
[2191] 2009-05-05 Pavel Roskin <address@hidden> |
Date: |
Tue, 05 May 2009 16:36:59 +0000 |
Revision: 2191
http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2191
Author: proski
Date: 2009-05-05 16:36:58 +0000 (Tue, 05 May 2009)
Log Message:
-----------
2009-05-05 Pavel Roskin <address@hidden>
* include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
of grub_dl_ref() and grub_dl_unref().
* commands/parttool.c: Remove preprocessor conditionals around
grub_dl_ref() and grub_dl_unref().
* fs/affs.c: Likewise.
* fs/afs.c: Likewise.
* fs/cpio.c: Likewise.
* fs/ext2.c: Likewise.
* fs/fat.c: Likewise.
* fs/hfs.c: Likewise.
* fs/hfsplus.c: Likewise.
* fs/iso9660.c: Likewise.
* fs/jfs.c: Likewise.
* fs/minix.c: Likewise.
* fs/ntfs.c: Likewise.
* fs/reiserfs.c: Likewise.
* fs/sfs.c: Likewise.
* fs/udf.c: Likewise.
* fs/ufs.c: Likewise.
* fs/xfs.c: Likewise.
* include/grub/dl.h: Likewise.
* loader/xnu.c: Likewise.
Modified Paths:
--------------
trunk/grub2/ChangeLog
trunk/grub2/commands/parttool.c
trunk/grub2/fs/affs.c
trunk/grub2/fs/afs.c
trunk/grub2/fs/cpio.c
trunk/grub2/fs/ext2.c
trunk/grub2/fs/fat.c
trunk/grub2/fs/hfs.c
trunk/grub2/fs/hfsplus.c
trunk/grub2/fs/iso9660.c
trunk/grub2/fs/jfs.c
trunk/grub2/fs/minix.c
trunk/grub2/fs/ntfs.c
trunk/grub2/fs/reiserfs.c
trunk/grub2/fs/sfs.c
trunk/grub2/fs/udf.c
trunk/grub2/fs/ufs.c
trunk/grub2/fs/xfs.c
trunk/grub2/include/grub/dl.h
trunk/grub2/loader/xnu.c
Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/ChangeLog 2009-05-05 16:36:58 UTC (rev 2191)
@@ -1,3 +1,28 @@
+2009-05-05 Pavel Roskin <address@hidden>
+
+ * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
+ of grub_dl_ref() and grub_dl_unref().
+ * commands/parttool.c: Remove preprocessor conditionals around
+ grub_dl_ref() and grub_dl_unref().
+ * fs/affs.c: Likewise.
+ * fs/afs.c: Likewise.
+ * fs/cpio.c: Likewise.
+ * fs/ext2.c: Likewise.
+ * fs/fat.c: Likewise.
+ * fs/hfs.c: Likewise.
+ * fs/hfsplus.c: Likewise.
+ * fs/iso9660.c: Likewise.
+ * fs/jfs.c: Likewise.
+ * fs/minix.c: Likewise.
+ * fs/ntfs.c: Likewise.
+ * fs/reiserfs.c: Likewise.
+ * fs/sfs.c: Likewise.
+ * fs/udf.c: Likewise.
+ * fs/ufs.c: Likewise.
+ * fs/xfs.c: Likewise.
+ * include/grub/dl.h: Likewise.
+ * loader/xnu.c: Likewise.
+
2009-05-04 Pavel Roskin <address@hidden>
* commands/acpi.c: Remove unused variable my_mod.
Modified: trunk/grub2/commands/parttool.c
===================================================================
--- trunk/grub2/commands/parttool.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/commands/parttool.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -46,10 +46,8 @@
struct grub_parttool *cur;
int nargs = 0;
-#ifndef GRUB_UTIL
if (! parts)
grub_dl_ref (mymod);
-#endif
cur = (struct grub_parttool *) grub_malloc (sizeof (struct grub_parttool));
cur->next = parts;
@@ -89,10 +87,8 @@
prev = cur;
cur = cur->next;
}
-#ifndef GRUB_UTIL
if (! parts)
grub_dl_unref (mymod);
-#endif
}
static grub_err_t
Modified: trunk/grub2/fs/affs.c
===================================================================
--- trunk/grub2/fs/affs.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/affs.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -104,9 +104,7 @@
int htsize;
};
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
static grub_disk_addr_t
@@ -392,9 +390,7 @@
struct grub_affs_data *data;
struct grub_fshelp_node *fdiro = 0;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_affs_mount (file->device->disk);
if (!data)
@@ -419,9 +415,7 @@
grub_free (fdiro);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -432,9 +426,7 @@
{
grub_free (file->data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return GRUB_ERR_NONE;
}
@@ -477,9 +469,7 @@
return hook (filename, &info);
}
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_affs_mount (device->disk);
if (!data)
@@ -497,9 +487,7 @@
grub_free (fdiro);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -512,9 +500,7 @@
struct grub_affs_file file;
grub_disk_t disk = device->disk;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_affs_mount (disk);
if (data)
@@ -533,9 +519,7 @@
else
*label = 0;
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -557,9 +541,7 @@
GRUB_MOD_INIT(affs)
{
grub_fs_register (&grub_affs_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI(affs)
Modified: trunk/grub2/fs/afs.c
===================================================================
--- trunk/grub2/fs/afs.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/afs.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -175,9 +175,7 @@
struct grub_fshelp_node diropen;
};
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
static grub_afs_off_t
grub_afs_run_to_num (struct grub_afs_sblock *sb,
@@ -505,9 +503,7 @@
struct grub_afs_data *data;
struct grub_fshelp_node *fdiro = 0;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_afs_mount (file->device->disk);
if (! data)
@@ -532,9 +528,7 @@
grub_free (fdiro);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -553,9 +547,7 @@
{
grub_free (file->data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return GRUB_ERR_NONE;
}
@@ -583,9 +575,7 @@
return hook (filename, &info);
}
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_afs_mount (device->disk);
if (! data)
@@ -603,9 +593,7 @@
grub_free (fdiro);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -623,9 +611,7 @@
GRUB_MOD_INIT (afs)
{
grub_fs_register (&grub_afs_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI (afs)
Modified: trunk/grub2/fs/cpio.c
===================================================================
--- trunk/grub2/fs/cpio.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/cpio.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -74,9 +74,7 @@
grub_uint32_t size;
};
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
static grub_err_t
grub_cpio_find_file (struct grub_cpio_data *data, char **name,
@@ -192,9 +190,7 @@
const char *np;
int len;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
prev = 0;
@@ -251,9 +247,7 @@
if (data)
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -266,9 +260,7 @@
char *fn;
int i, j;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_cpio_mount (file->device->disk);
if (!data)
@@ -322,9 +314,7 @@
if (data)
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -344,9 +334,7 @@
{
grub_free (file->data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -370,9 +358,7 @@
#endif
{
grub_fs_register (&grub_cpio_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
#ifdef MODE_USTAR
Modified: trunk/grub2/fs/ext2.c
===================================================================
--- trunk/grub2/fs/ext2.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/ext2.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -317,9 +317,7 @@
struct grub_fshelp_node diropen;
};
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
@@ -725,9 +723,7 @@
struct grub_ext2_data *data;
struct grub_fshelp_node *fdiro = 0;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_ext2_mount (file->device->disk);
if (! data)
@@ -759,9 +755,7 @@
grub_free (fdiro);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -771,9 +765,7 @@
{
grub_free (file->data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return GRUB_ERR_NONE;
}
@@ -825,9 +817,7 @@
return hook (filename, &info);
}
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_ext2_mount (device->disk);
if (! data)
@@ -845,9 +835,7 @@
grub_free (fdiro);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -858,9 +846,7 @@
struct grub_ext2_data *data;
grub_disk_t disk = device->disk;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_ext2_mount (disk);
if (data)
@@ -868,9 +854,7 @@
else
*label = NULL;
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -883,9 +867,7 @@
struct grub_ext2_data *data;
grub_disk_t disk = device->disk;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_ext2_mount (disk);
if (data)
@@ -900,9 +882,7 @@
else
*uuid = NULL;
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -916,9 +896,7 @@
struct grub_ext2_data *data;
grub_disk_t disk = device->disk;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_ext2_mount (disk);
if (!data)
@@ -926,9 +904,7 @@
else
*tm = grub_le_to_cpu32 (data->sblock.utime);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -954,9 +930,7 @@
GRUB_MOD_INIT(ext2)
{
grub_fs_register (&grub_ext2_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI(ext2)
Modified: trunk/grub2/fs/fat.c
===================================================================
--- trunk/grub2/fs/fat.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/fat.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -149,9 +149,7 @@
grub_uint32_t uuid;
};
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
static int
fat_log2 (unsigned x)
@@ -692,9 +690,7 @@
char *dirname = 0;
char *p;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_fat_mount (disk);
if (! data)
@@ -723,9 +719,7 @@
grub_free (dirname);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -736,9 +730,7 @@
struct grub_fat_data *data = 0;
char *p = (char *) name;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_fat_mount (file->device->disk);
if (! data)
@@ -767,9 +759,7 @@
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -786,9 +776,7 @@
{
grub_free (file->data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -810,9 +798,7 @@
return 0;
}
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_fat_mount (disk);
if (! data)
@@ -830,9 +816,7 @@
fail:
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -845,9 +829,7 @@
struct grub_fat_data *data;
grub_disk_t disk = device->disk;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_fat_mount (disk);
if (data)
@@ -859,9 +841,7 @@
else
*uuid = NULL;
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -883,9 +863,7 @@
GRUB_MOD_INIT(fat)
{
grub_fs_register (&grub_fat_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI(fat)
Modified: trunk/grub2/fs/hfs.c
===================================================================
--- trunk/grub2/fs/hfs.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/hfs.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -159,9 +159,7 @@
int datalen;
};
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
static int grub_hfs_find_node (struct grub_hfs_data *, char *,
grub_uint32_t, int, char *, int);
@@ -972,9 +970,7 @@
struct grub_hfs_data *data;
struct grub_hfs_filerec frec;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_hfs_mount (device->disk);
if (!data)
@@ -995,9 +991,7 @@
fail:
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -1010,18 +1004,14 @@
struct grub_hfs_data *data;
struct grub_hfs_filerec frec;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_hfs_mount (file->device->disk);
if (grub_hfs_find_dir (data, name, &frec, 0))
{
grub_free (data);
-#ifndef GRUB_UTIL
- grub_dl_unref (my_mod);
-#endif
+ grub_dl_unref (my_mod);
return grub_errno;
}
@@ -1029,9 +1019,7 @@
{
grub_free (data);
grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a file");
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -1061,9 +1049,7 @@
{
grub_free (file->data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return 0;
}
@@ -1102,9 +1088,7 @@
GRUB_MOD_INIT(hfs)
{
grub_fs_register (&grub_hfs_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI(hfs)
Modified: trunk/grub2/fs/hfsplus.c
===================================================================
--- trunk/grub2/fs/hfsplus.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/hfsplus.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -226,9 +226,7 @@
int embedded_offset;
};
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
/* Return the offset of the record with the index INDEX, in the node
@@ -827,9 +825,7 @@
struct grub_hfsplus_data *data;
struct grub_fshelp_node *fdiro = 0;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_hfsplus_mount (file->device->disk);
if (!data)
@@ -855,9 +851,7 @@
grub_free (fdiro);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -868,9 +862,7 @@
{
grub_free (file->data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return GRUB_ERR_NONE;
}
@@ -916,9 +908,7 @@
return hook (filename, &info);
}
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_hfsplus_mount (device->disk);
if (!data)
@@ -939,9 +929,7 @@
grub_free (fdiro);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -964,9 +952,7 @@
struct grub_hfsplus_data *data;
grub_disk_t disk = device->disk;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_hfsplus_mount (disk);
if (!data)
@@ -974,9 +960,7 @@
else
*tm = grub_be_to_cpu32 (data->volheader.utime) - 2082844800;
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -990,9 +974,7 @@
struct grub_hfsplus_data *data;
grub_disk_t disk = device->disk;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_hfsplus_mount (disk);
if (data)
@@ -1005,9 +987,7 @@
else
*uuid = NULL;
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -1032,9 +1012,7 @@
GRUB_MOD_INIT(hfsplus)
{
grub_fs_register (&grub_hfsplus_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI(hfsplus)
Modified: trunk/grub2/fs/iso9660.c
===================================================================
--- trunk/grub2/fs/iso9660.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/iso9660.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -150,9 +150,7 @@
unsigned int dir_off;
};
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
/* Iterate over the susp entries, starting with block SUA_BLOCK on the
@@ -688,9 +686,7 @@
return hook (filename, &info);
}
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_iso9660_mount (device->disk);
if (! data)
@@ -717,9 +713,7 @@
fail:
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -733,9 +727,7 @@
struct grub_fshelp_node rootnode;
struct grub_fshelp_node *foundnode;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_iso9660_mount (file->device->disk);
if (!data)
@@ -763,9 +755,7 @@
return 0;
fail:
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -796,9 +786,7 @@
{
grub_free (file->data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return GRUB_ERR_NONE;
}
@@ -832,9 +820,7 @@
struct grub_iso9660_data *data;
grub_disk_t disk = device->disk;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_iso9660_mount (disk);
if (data)
@@ -868,9 +854,7 @@
else
*uuid = NULL;
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -894,9 +878,7 @@
GRUB_MOD_INIT(iso9660)
{
grub_fs_register (&grub_iso9660_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI(iso9660)
Modified: trunk/grub2/fs/jfs.c
===================================================================
--- trunk/grub2/fs/jfs.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/jfs.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -229,9 +229,7 @@
} __attribute__ ((packed));
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
static grub_err_t grub_jfs_lookup_symlink (struct grub_jfs_data *data, int
ino);
@@ -734,9 +732,7 @@
struct grub_jfs_data *data = 0;
struct grub_jfs_diropen *diro = 0;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_jfs_mount (device->disk);
if (!data)
@@ -773,9 +769,7 @@
grub_jfs_closedir (diro);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -787,9 +781,7 @@
{
struct grub_jfs_data *data;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_jfs_mount (file->device->disk);
if (!data)
@@ -814,9 +806,7 @@
fail:
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -839,9 +829,7 @@
{
grub_free (file->data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return GRUB_ERR_NONE;
}
@@ -876,9 +864,7 @@
GRUB_MOD_INIT(jfs)
{
grub_fs_register (&grub_jfs_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI(jfs)
Modified: trunk/grub2/fs/minix.c
===================================================================
--- trunk/grub2/fs/minix.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/minix.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -112,9 +112,7 @@
int filename_size;
};
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
static grub_err_t grub_minix_find_file (struct grub_minix_data *data,
const char *path);
@@ -607,9 +605,7 @@
GRUB_MOD_INIT(minix)
{
grub_fs_register (&grub_minix_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI(minix)
Modified: trunk/grub2/fs/ntfs.c
===================================================================
--- trunk/grub2/fs/ntfs.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/ntfs.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -25,9 +25,7 @@
#include <grub/fshelp.h>
#include <grub/ntfs.h>
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
ntfscomp_func_t grub_ntfscomp_func;
@@ -885,11 +883,8 @@
return hook (filename, &info);
}
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
-
data = grub_ntfs_mount (device->disk);
if (!data)
goto fail;
@@ -915,9 +910,7 @@
grub_free (data);
}
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -928,9 +921,7 @@
struct grub_ntfs_data *data = 0;
struct grub_fshelp_node *mft = 0;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_ntfs_mount (file->device->disk);
if (!data)
@@ -968,9 +959,7 @@
grub_free (data);
}
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -1011,9 +1000,7 @@
grub_free (data);
}
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -1025,9 +1012,7 @@
struct grub_fshelp_node *mft = 0;
char *pa;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
*label = 0;
@@ -1079,9 +1064,7 @@
grub_free (data);
}
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -1092,9 +1075,7 @@
struct grub_ntfs_data *data;
grub_disk_t disk = device->disk;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_ntfs_mount (disk);
if (data)
@@ -1105,9 +1086,7 @@
else
*uuid = NULL;
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -1128,9 +1107,7 @@
GRUB_MOD_INIT (ntfs)
{
grub_fs_register (&grub_ntfs_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI (ntfs)
Modified: trunk/grub2/fs/reiserfs.c
===================================================================
--- trunk/grub2/fs/reiserfs.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/reiserfs.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -60,9 +60,7 @@
#define S_IFLNK 0xA000
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
#define assert(boolean) real_assert (boolean, __FILE__, __LINE__)
static inline void
@@ -986,9 +984,7 @@
grub_uint32_t block_number;
grub_uint16_t entry_version, block_size, entry_location;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_reiserfs_mount (file->device->disk);
if (! data)
goto fail;
@@ -1061,9 +1057,7 @@
assert (grub_errno != GRUB_ERR_NONE);
grub_free (found);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -1257,9 +1251,7 @@
grub_free (data);
grub_free (node);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return GRUB_ERR_NONE;
}
@@ -1287,9 +1279,7 @@
grub_free (node);
return hook (filename, &info);
}
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_reiserfs_mount (device->disk);
if (! data)
goto fail;
@@ -1311,16 +1301,12 @@
goto fail;
grub_reiserfs_iterate_dir (found, iterate);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return GRUB_ERR_NONE;
fail:
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -1347,9 +1333,7 @@
struct grub_reiserfs_data *data;
grub_disk_t disk = device->disk;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_reiserfs_mount (disk);
if (data)
@@ -1364,9 +1348,7 @@
else
*uuid = NULL;
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -1388,9 +1370,7 @@
GRUB_MOD_INIT(reiserfs)
{
grub_fs_register (&grub_reiserfs_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI(reiserfs)
Modified: trunk/grub2/fs/sfs.c
===================================================================
--- trunk/grub2/fs/sfs.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/sfs.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -135,9 +135,7 @@
char *label;
};
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
/* Lookup the extent starting with BLOCK in the filesystem described
@@ -454,9 +452,7 @@
struct grub_sfs_data *data;
struct grub_fshelp_node *fdiro = 0;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_sfs_mount (file->device->disk);
if (!data)
@@ -483,9 +479,7 @@
grub_free (data->label);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -496,9 +490,7 @@
{
grub_free (file->data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return GRUB_ERR_NONE;
}
@@ -540,9 +532,7 @@
return hook (filename, &info);
}
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_sfs_mount (device->disk);
if (!data)
@@ -562,9 +552,7 @@
grub_free (data->label);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -600,9 +588,7 @@
GRUB_MOD_INIT(sfs)
{
grub_fs_register (&grub_sfs_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI(sfs)
Modified: trunk/grub2/fs/udf.c
===================================================================
--- trunk/grub2/fs/udf.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/udf.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -356,9 +356,7 @@
int part_ref;
};
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
static grub_uint32_t
grub_udf_get_block (struct grub_udf_data *data,
@@ -790,9 +788,7 @@
return hook (filename, &info);
}
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_udf_mount (device->disk);
if (!data)
@@ -814,9 +810,7 @@
fail:
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -828,9 +822,7 @@
struct grub_fshelp_node rootnode;
struct grub_fshelp_node *foundnode;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_udf_mount (file->device->disk);
if (!data)
@@ -851,9 +843,7 @@
return 0;
fail:
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -879,9 +869,7 @@
grub_free (node);
}
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return GRUB_ERR_NONE;
}
@@ -916,9 +904,7 @@
GRUB_MOD_INIT (udf)
{
grub_fs_register (&grub_udf_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI (udf)
Modified: trunk/grub2/fs/ufs.c
===================================================================
--- trunk/grub2/fs/ufs.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/ufs.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -207,9 +207,7 @@
int linknest;
};
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
/* Forward declaration. */
static grub_err_t grub_ufs_find_file (struct grub_ufs_data *data,
@@ -720,9 +718,7 @@
{
struct grub_ufs_data *data = 0;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
*label = 0;
@@ -733,9 +729,7 @@
*label = grub_strdup ((char *) data->sblock.volume_name);
}
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -748,9 +742,7 @@
{
struct grub_ufs_data *data = 0;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_ufs_mount (device->disk);
if (!data)
@@ -760,9 +752,7 @@
else
*tm = grub_le_to_cpu64 (data->sblock.mtime2);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -786,9 +776,7 @@
GRUB_MOD_INIT(ufs)
{
grub_fs_register (&grub_ufs_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI(ufs)
Modified: trunk/grub2/fs/xfs.c
===================================================================
--- trunk/grub2/fs/xfs.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/fs/xfs.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -148,9 +148,7 @@
};
-#ifndef GRUB_UTIL
static grub_dl_t my_mod;
-#endif
@@ -641,9 +639,7 @@
return hook (filename, &info);
}
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_xfs_mount (device->disk);
if (!data)
@@ -661,9 +657,7 @@
grub_free (fdiro);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
@@ -678,9 +672,7 @@
struct grub_xfs_data *data;
struct grub_fshelp_node *fdiro = 0;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_xfs_mount (file->device->disk);
if (!data)
@@ -714,9 +706,7 @@
grub_free (fdiro);
grub_free (data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return grub_errno;
}
@@ -738,9 +728,7 @@
{
grub_free (file->data);
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
return GRUB_ERR_NONE;
}
@@ -752,9 +740,7 @@
struct grub_xfs_data *data;
grub_disk_t disk = device->disk;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_xfs_mount (disk);
if (data)
@@ -762,9 +748,7 @@
else
*label = 0;
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -777,9 +761,7 @@
struct grub_xfs_data *data;
grub_disk_t disk = device->disk;
-#ifndef GRUB_UTIL
grub_dl_ref (my_mod);
-#endif
data = grub_xfs_mount (disk);
if (data)
@@ -794,9 +776,7 @@
else
*uuid = NULL;
-#ifndef GRUB_UTIL
grub_dl_unref (my_mod);
-#endif
grub_free (data);
@@ -820,9 +800,7 @@
GRUB_MOD_INIT(xfs)
{
grub_fs_register (&grub_xfs_fs);
-#ifndef GRUB_UTIL
my_mod = mod;
-#endif
}
GRUB_MOD_FINI(xfs)
Modified: trunk/grub2/include/grub/dl.h
===================================================================
--- trunk/grub2/include/grub/dl.h 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/include/grub/dl.h 2009-05-05 16:36:58 UTC (rev 2191)
@@ -82,8 +82,23 @@
int EXPORT_FUNC(grub_dl_unload) (grub_dl_t mod);
void grub_dl_unload_unneeded (void);
void grub_dl_unload_all (void);
+#ifdef GRUB_UTIL
+static inline int
+grub_dl_ref (grub_dl_t mod)
+{
+ (void) mod;
+ return 0;
+}
+static inline int
+grub_dl_unref (grub_dl_t mod)
+{
+ (void) mod;
+ return 0;
+}
+#else
int EXPORT_FUNC(grub_dl_ref) (grub_dl_t mod);
int EXPORT_FUNC(grub_dl_unref) (grub_dl_t mod);
+#endif
void EXPORT_FUNC(grub_dl_iterate) (int (*hook) (grub_dl_t mod));
grub_dl_t EXPORT_FUNC(grub_dl_get) (const char *name);
grub_err_t EXPORT_FUNC(grub_dl_register_symbol) (const char *name, void *addr,
Modified: trunk/grub2/loader/xnu.c
===================================================================
--- trunk/grub2/loader/xnu.c 2009-05-04 23:33:34 UTC (rev 2190)
+++ trunk/grub2/loader/xnu.c 2009-05-05 16:36:58 UTC (rev 2191)
@@ -1306,20 +1306,16 @@
void
grub_xnu_lock ()
{
-#ifndef GRUB_UTIL
if (!locked)
grub_dl_ref (my_mod);
-#endif
locked = 1;
}
void
grub_xnu_unlock ()
{
-#ifndef GRUB_UTIL
if (locked)
grub_dl_unref (my_mod);
-#endif
locked = 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [2191] 2009-05-05 Pavel Roskin <address@hidden>,
Pavel Roskin <=