From: Karel Zak Date: Wed, 28 Nov 2007 13:08:33 +0000 (+0100) Subject: include: add mount paths to pathnames.h X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d43977ffcd294e58b9594ce479448fd91f88129;p=util-linux include: add mount paths to pathnames.h Signed-off-by: Karel Zak --- diff --git a/include/pathnames.h b/include/pathnames.h index 49a1715d..e171d936 100644 --- a/include/pathnames.h +++ b/include/pathnames.h @@ -42,8 +42,6 @@ #define _PATH_USERTTY "/etc/usertty" /* used in login-utils/shutdown.c */ -#define _PATH_MTAB "/etc/mtab" -#define _PATH_UMOUNT "/bin/umount" /* used in login-utils/setpwnam.h and login-utils/islocal.c */ #define _PATH_PASSWD "/etc/passwd" @@ -68,5 +66,36 @@ #define _PATH_WORDS "/usr/share/dict/words" #define _PATH_WORDS_ALT "/usr/share/dict/web2" +/* mount paths */ +#define _PATH_UMOUNT "/bin/umount" + +#define _PATH_FILESYSTEMS "/etc/filesystems" +#define _PATH_PROC_SWAPS "/proc/swaps" +#define _PATH_PROC_FILESYSTEMS "/proc/filesystems" +#define _PATH_PROC_MOUNTS "/proc/mounts" + +#ifndef _PATH_MOUNTED +# ifdef MOUNTED /* deprecated */ +# define _PATH_MOUNTED MOUNTED +# else +# define _PATH_MOUNTED "/etc/mtab" +# endif +#endif + +#ifndef _PATH_MNTTAB +# ifdef MNTTAB /* deprecated */ +# define _PATH_MNTTAB MNTTAB +# else +# define _PATH_MNTTAB "/etc/fstab" +# endif +#endif + +#define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~" +#define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp" + +/* udev paths */ +#define _PATH_DEV_BYLABEL "/dev/disk/by-label" +#define _PATH_DEV_BYUUID "/dev/disk/by-uuid" + #endif /* PATHNAMES_H */ diff --git a/tests/expected/ts-include-pathnames b/tests/expected/ts-include-pathnames index a6015447..318f44e5 100644 --- a/tests/expected/ts-include-pathnames +++ b/tests/expected/ts-include-pathnames @@ -15,7 +15,6 @@ _PATH_SHUTDOWN_CONF /etc/shutdown.conf _PATH_SECURE /etc/securesingle _PATH_USERTTY /etc/usertty - _PATH_MTAB /etc/mtab _PATH_UMOUNT /bin/umount _PATH_PASSWD /etc/passwd _PATH_GSHADOW /etc/gshadow @@ -32,3 +31,13 @@ _PATH_SHADOW_PTMPTMP /etc/sptmptmp _PATH_SHADOW_GTMPTMP /etc/sgtmptmp _PATH_WORDS /usr/share/dict/words _PATH_WORDS_ALT /usr/share/dict/web2 + _PATH_UMOUNT /bin/umount + _PATH_FILESYSTEMS /etc/filesystems + _PATH_PROC_SWAPS /proc/swaps +_PATH_PROC_FILESYSTEMS /proc/filesystems + _PATH_MOUNTED /etc/mtab + _PATH_MNTTAB /etc/fstab + _PATH_MOUNTED_LOCK /etc/mtab~ + _PATH_MOUNTED_TMP /etc/mtab.tmp + _PATH_DEV_BYLABEL /dev/disk/by-label + _PATH_DEV_BYUUID /dev/disk/by-uuid diff --git a/tests/helpers/test_pathnames.c b/tests/helpers/test_pathnames.c index 594f4583..1accedec 100644 --- a/tests/helpers/test_pathnames.c +++ b/tests/helpers/test_pathnames.c @@ -48,7 +48,6 @@ struct hlpPath paths[] = DEF_HLPPATH(_PATH_SHUTDOWN_CONF), DEF_HLPPATH(_PATH_SECURE), DEF_HLPPATH(_PATH_USERTTY), - DEF_HLPPATH(_PATH_MTAB), DEF_HLPPATH(_PATH_UMOUNT), DEF_HLPPATH(_PATH_PASSWD), DEF_HLPPATH(_PATH_GSHADOW), @@ -65,6 +64,16 @@ struct hlpPath paths[] = DEF_HLPPATH(_PATH_SHADOW_GTMPTMP), DEF_HLPPATH(_PATH_WORDS), DEF_HLPPATH(_PATH_WORDS_ALT), + DEF_HLPPATH(_PATH_UMOUNT), + DEF_HLPPATH(_PATH_FILESYSTEMS), + DEF_HLPPATH(_PATH_PROC_SWAPS), + DEF_HLPPATH(_PATH_PROC_FILESYSTEMS), + DEF_HLPPATH(_PATH_MOUNTED), + DEF_HLPPATH(_PATH_MNTTAB), + DEF_HLPPATH(_PATH_MOUNTED_LOCK), + DEF_HLPPATH(_PATH_MOUNTED_TMP), + DEF_HLPPATH(_PATH_DEV_BYLABEL), + DEF_HLPPATH(_PATH_DEV_BYUUID), { NULL, NULL } };