]> err.no Git - util-linux/commitdiff
include: add mount paths to pathnames.h
authorKarel Zak <kzak@redhat.com>
Wed, 28 Nov 2007 13:08:33 +0000 (14:08 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 28 Nov 2007 13:08:33 +0000 (14:08 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/pathnames.h
tests/expected/ts-include-pathnames
tests/helpers/test_pathnames.c

index 49a1715d110147bd37440f32504d5829f730c7da..e171d9369492e6e29948bb9d101f02a29c5644f5 100644 (file)
@@ -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"
 #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 */
 
index a601544775a19ba5c7c5f0b902bfa311a7101b54..318f44e5a304a2a82699cc477ee31fa5fafe50e0 100644 (file)
@@ -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
index 594f458335560a54ef24690491723616f3a4df93..1accedecd89244a49f1182b045af8b8174a6b6c5 100644 (file)
@@ -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 }
 };