X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fmount.c;h=0c990c3192b233b63c2322f352923a1d16cf530d;hb=65852011d8f5150c5c0bcbfeac90e2fd784905c5;hp=c584f81d4e0e2e9af3bb306ab8d8a6f3a5660b09;hpb=77df7d6d537cebe05e06bf07e6e4a2082fe6656a;p=libguestfs.git diff --git a/daemon/mount.c b/daemon/mount.c index c584f81..0c990c3 100644 --- a/daemon/mount.c +++ b/daemon/mount.c @@ -40,9 +40,12 @@ is_root_mounted (void) FILE *fp; struct mntent *m; - fp = setmntent ("/etc/mtab", "r"); + /* NB: Eventually we should aim to parse /proc/self/mountinfo, but + * that requires custom parsing code. + */ + fp = setmntent ("/proc/mounts", "r"); if (fp == NULL) { - perror ("/etc/mtab"); + perror ("/proc/mounts"); exit (EXIT_FAILURE); }