From b48a24ea354d530694865691a60a71fae5b0373c Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Tue, 27 Oct 2015 21:58:55 +0100 Subject: don't hardcode paths --- lr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lr.c') diff --git a/lr.c b/lr.c index 816357e..1463aee 100644 --- a/lr.c +++ b/lr.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -665,7 +666,7 @@ scan_filesystems() /* Approach: iterate over mtab and memorize st_dev for each mountpoint. * this will fail if we are not allowed to read the mountpoint, but then * we should not have to look up this st_dev value... */ - mtab = setmntent("/etc/mtab", "r"); + mtab = setmntent(_PATH_MOUNTED, "r"); if (!mtab) return; @@ -692,7 +693,7 @@ scan_filesystems() struct mnttab mnt; struct stat st; - mtab = fopen("/etc/mnttab", "r"); + mtab = fopen(MNTTAB, "r"); if (!mtab) return; -- cgit 1.4.1