2009-05-05 Pavel Roskin <proski@gnu.org>
* 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.
This commit is contained in:
parent
de5fd76e95
commit
119494b506
20 changed files with 41 additions and 282 deletions
12
fs/ufs.c
12
fs/ufs.c
|
@ -207,9 +207,7 @@ struct grub_ufs_data
|
|||
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 @@ grub_ufs_label (grub_device_t device, char **label)
|
|||
{
|
||||
struct grub_ufs_data *data = 0;
|
||||
|
||||
#ifndef GRUB_UTIL
|
||||
grub_dl_ref (my_mod);
|
||||
#endif
|
||||
|
||||
*label = 0;
|
||||
|
||||
|
@ -733,9 +729,7 @@ grub_ufs_label (grub_device_t device, char **label)
|
|||
*label = grub_strdup ((char *) data->sblock.volume_name);
|
||||
}
|
||||
|
||||
#ifndef GRUB_UTIL
|
||||
grub_dl_unref (my_mod);
|
||||
#endif
|
||||
|
||||
grub_free (data);
|
||||
|
||||
|
@ -748,9 +742,7 @@ grub_ufs_mtime (grub_device_t device, grub_int32_t *tm)
|
|||
{
|
||||
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 @@ grub_ufs_mtime (grub_device_t device, grub_int32_t *tm)
|
|||
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 @@ static struct grub_fs grub_ufs_fs =
|
|||
GRUB_MOD_INIT(ufs)
|
||||
{
|
||||
grub_fs_register (&grub_ufs_fs);
|
||||
#ifndef GRUB_UTIL
|
||||
my_mod = mod;
|
||||
#endif
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI(ufs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue