aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rc/mountinfo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c
index 29eb1600..d9c25a38 100644
--- a/src/rc/mountinfo.c
+++ b/src/rc/mountinfo.c
@@ -46,6 +46,7 @@
#include "_usage.h"
const char *applet = NULL;
+const char *procmounts = "/proc/mounts";
const char *extraopts = "[mount1] [mount2] ...";
const char *getoptstring = "f:F:n:N:o:O:p:P:iste:E:" getoptstring_COMMON;
const struct option longopts[] = {
@@ -323,7 +324,7 @@ find_mounts(struct args *args)
int netdev;
RC_STRINGLIST *list;
- if ((fp = fopen("/proc/self/mounts", "r")) == NULL)
+ if ((fp = fopen(procmounts, "r")) == NULL)
eerrorx("getmntinfo: %s", strerror(errno));
list = rc_stringlist_new();