]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mountpoint: don't hardcode paths
authorKarel Zak <kzak@redhat.com>
Thu, 14 Feb 2013 14:46:06 +0000 (15:46 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Feb 2013 14:46:06 +0000 (15:46 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/mountpoint.c

index 6ab813d72ab176878560807c4e376d5c4cf537d5..c86e94b12a9ca7852e68bdc805e4c65b61703fcf 100644 (file)
 #include "xalloc.h"
 #include "c.h"
 #include "closestream.h"
+#include "pathnames.h"
 
 static int quiet;
 
 static int dir_to_device(const char *spec, dev_t *dev)
 {
-       struct libmnt_table *tb = mnt_new_table_from_file("/proc/self/mountinfo");
+       struct libmnt_table *tb = mnt_new_table_from_file(_PATH_PROC_MOUNTINFO);
        struct libmnt_fs *fs;
        struct libmnt_cache *cache;
        int rc = -1;