From 6d4e8433974fd8567885635ae0454031290f96b1 Mon Sep 17 00:00:00 2001 From: Jason Graham Date: Mon, 24 Jul 2017 18:22:46 -0500 Subject: fix ENT macro usage X-Gentoo-Bug: 624796 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=624796 --- src/rc/fstabinfo.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/rc/fstabinfo.c b/src/rc/fstabinfo.c index 75c8bc2b..a2e707aa 100644 --- a/src/rc/fstabinfo.c +++ b/src/rc/fstabinfo.c @@ -35,11 +35,11 @@ # define GET_ENT getmntent (fp) # define GET_ENT_FILE(_name) getmntfile (_name) # define END_ENT endmntent (fp) -# define ENT_BLOCKDEVICE(_ent) ent->mnt_fsname -# define ENT_FILE(_ent) ent->mnt_dir -# define ENT_TYPE(_ent) ent->mnt_type -# define ENT_OPTS(_ent) ent->mnt_opts -# define ENT_PASS(_ent) ent->mnt_passno +# define ENT_BLOCKDEVICE(_ent) (_ent)->mnt_fsname +# define ENT_FILE(_ent) (_ent)->mnt_dir +# define ENT_TYPE(_ent) (_ent)->mnt_type +# define ENT_OPTS(_ent) (_ent)->mnt_opts +# define ENT_PASS(_ent) (_ent)->mnt_passno #else # define HAVE_GETFSENT # include @@ -48,11 +48,11 @@ # define GET_ENT getfsent () # define GET_ENT_FILE(_name) getfsfile (_name) # define END_ENT endfsent () -# define ENT_BLOCKDEVICE(_ent) ent->fs_spec -# define ENT_TYPE(_ent) ent->fs_vfstype -# define ENT_FILE(_ent) ent->fs_file -# define ENT_OPTS(_ent) ent->fs_mntops -# define ENT_PASS(_ent) ent->fs_passno +# define ENT_BLOCKDEVICE(_ent) (_ent)->fs_spec +# define ENT_TYPE(_ent) (_ent)->fs_vfstype +# define ENT_FILE(_ent) (_ent)->fs_file +# define ENT_OPTS(_ent) (_ent)->fs_mntops +# define ENT_PASS(_ent) (_ent)->fs_passno #endif #include "einfo.h" @@ -114,24 +114,24 @@ do_mount(struct ENT *ent, bool remount) argv[0] = UNCONST("mount"); argv[1] = UNCONST("-o"); - argv[2] = ENT_OPTS(*ent); + argv[2] = ENT_OPTS(ent); argv[3] = UNCONST("-t"); - argv[4] = ENT_TYPE(*ent); + argv[4] = ENT_TYPE(ent); if (!remount) { - argv[5] = ENT_BLOCKDEVICE(*ent); - argv[6] = ENT_FILE(*ent); + argv[5] = ENT_BLOCKDEVICE(ent); + argv[6] = ENT_FILE(ent); argv[7] = NULL; } else { #ifdef __linux__ argv[5] = UNCONST("-o"); argv[6] = UNCONST("remount"); - argv[7] = ENT_BLOCKDEVICE(*ent); - argv[8] = ENT_FILE(*ent); + argv[7] = ENT_BLOCKDEVICE(ent); + argv[8] = ENT_FILE(ent); argv[9] = NULL; #else argv[5] = UNCONST("-u"); - argv[6] = ENT_BLOCKDEVICE(*ent); - argv[7] = ENT_FILE(*ent); + argv[6] = ENT_BLOCKDEVICE(ent); + argv[7] = ENT_FILE(ent); argv[8] = NULL; #endif } -- cgit v1.2.3