Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 624796
Collapse All | Expand All

(-)a/src/rc/fstabinfo.c (-18 / +18 lines)
Lines 35-45 Link Here
35
#  define GET_ENT getmntent (fp)
35
#  define GET_ENT getmntent (fp)
36
#  define GET_ENT_FILE(_name) getmntfile (_name)
36
#  define GET_ENT_FILE(_name) getmntfile (_name)
37
#  define END_ENT endmntent (fp)
37
#  define END_ENT endmntent (fp)
38
#  define ENT_BLOCKDEVICE(_ent) ent->mnt_fsname
38
#  define ENT_BLOCKDEVICE(_ent) (_ent)->mnt_fsname
39
#  define ENT_FILE(_ent) ent->mnt_dir
39
#  define ENT_FILE(_ent) (_ent)->mnt_dir
40
#  define ENT_TYPE(_ent) ent->mnt_type
40
#  define ENT_TYPE(_ent) (_ent)->mnt_type
41
#  define ENT_OPTS(_ent) ent->mnt_opts
41
#  define ENT_OPTS(_ent) (_ent)->mnt_opts
42
#  define ENT_PASS(_ent) ent->mnt_passno
42
#  define ENT_PASS(_ent) (_ent)->mnt_passno
43
#else
43
#else
44
#  define HAVE_GETFSENT
44
#  define HAVE_GETFSENT
45
#  include <fstab.h>
45
#  include <fstab.h>
Lines 48-58 Link Here
48
#  define GET_ENT getfsent ()
48
#  define GET_ENT getfsent ()
49
#  define GET_ENT_FILE(_name) getfsfile (_name)
49
#  define GET_ENT_FILE(_name) getfsfile (_name)
50
#  define END_ENT endfsent ()
50
#  define END_ENT endfsent ()
51
#  define ENT_BLOCKDEVICE(_ent) ent->fs_spec
51
#  define ENT_BLOCKDEVICE(_ent) (_ent)->fs_spec
52
#  define ENT_TYPE(_ent) ent->fs_vfstype
52
#  define ENT_TYPE(_ent) (_ent)->fs_vfstype
53
#  define ENT_FILE(_ent) ent->fs_file
53
#  define ENT_FILE(_ent) (_ent)->fs_file
54
#  define ENT_OPTS(_ent) ent->fs_mntops
54
#  define ENT_OPTS(_ent) (_ent)->fs_mntops
55
#  define ENT_PASS(_ent) ent->fs_passno
55
#  define ENT_PASS(_ent) (_ent)->fs_passno
56
#endif
56
#endif
57
57
58
#include "einfo.h"
58
#include "einfo.h"
Lines 114-137 do_mount(struct ENT *ent, bool remount) Link Here
114
114
115
	argv[0] = UNCONST("mount");
115
	argv[0] = UNCONST("mount");
116
	argv[1] = UNCONST("-o");
116
	argv[1] = UNCONST("-o");
117
	argv[2] = ENT_OPTS(*ent);
117
	argv[2] = ENT_OPTS(ent);
118
	argv[3] = UNCONST("-t");
118
	argv[3] = UNCONST("-t");
119
	argv[4] = ENT_TYPE(*ent);
119
	argv[4] = ENT_TYPE(ent);
120
	if (!remount) {
120
	if (!remount) {
121
		argv[5] = ENT_BLOCKDEVICE(*ent);
121
		argv[5] = ENT_BLOCKDEVICE(ent);
122
		argv[6] = ENT_FILE(*ent);
122
		argv[6] = ENT_FILE(ent);
123
		argv[7] = NULL;
123
		argv[7] = NULL;
124
	} else {
124
	} else {
125
#ifdef __linux__
125
#ifdef __linux__
126
		argv[5] = UNCONST("-o");
126
		argv[5] = UNCONST("-o");
127
		argv[6] = UNCONST("remount");
127
		argv[6] = UNCONST("remount");
128
		argv[7] = ENT_BLOCKDEVICE(*ent);
128
		argv[7] = ENT_BLOCKDEVICE(ent);
129
		argv[8] = ENT_FILE(*ent);
129
		argv[8] = ENT_FILE(ent);
130
		argv[9] = NULL;
130
		argv[9] = NULL;
131
#else
131
#else
132
		argv[5] = UNCONST("-u");
132
		argv[5] = UNCONST("-u");
133
		argv[6] = ENT_BLOCKDEVICE(*ent);
133
		argv[6] = ENT_BLOCKDEVICE(ent);
134
		argv[7] = ENT_FILE(*ent);
134
		argv[7] = ENT_FILE(ent);
135
		argv[8] = NULL;
135
		argv[8] = NULL;
136
#endif
136
#endif
137
	}
137
	}

Return to bug 624796