Change /etc/mtab to /proc/self/mounts

Fix misleading error message:

 "The /dev/zfs device is missing and must be created.", if /etc/mtab is missing.

Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com>
Closes #4680 
Closes #5029
This commit is contained in:
slashdd
2016-09-20 13:07:58 -04:00
committed by Brian Behlendorf
parent 25e2ab16be
commit 792517389f
13 changed files with 53 additions and 43 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ parse_pathname(const char *inpath, char *dataset, char *relpath,
#else
if ((fp = fopen(MNTTAB, "r")) == NULL) {
#endif
(void) fprintf(stderr, "cannot open /etc/mtab\n");
(void) fprintf(stderr, "cannot open %s\n", MNTTAB);
return (-1);
}