diff options
author | Aaron Fineman <[email protected]> | 2013-06-27 15:19:25 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-06-27 14:43:37 -0700 |
commit | bbb75c11908d1009b6749b797b3a763558bbaaaf (patch) | |
tree | 2e5a2c3a2e121335ad50963adc88f3e0ad3d9c24 | |
parent | c12936b141e7479a1402561e9e528731d763747e (diff) |
Add error message for missing /etc/mtab
The zpool command should not silently fail when the /etc/mtab
file does not exist. This can occur in an initramfs environment
when the /etc/mtab file hasn't yet been generated.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #1541
-rw-r--r-- | lib/libzfs/libzfs_util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c index a4e1255bb..5bb88e946 100644 --- a/lib/libzfs/libzfs_util.c +++ b/lib/libzfs/libzfs_util.c @@ -704,6 +704,8 @@ libzfs_init(void) if ((hdl->libzfs_mnttab = fopen(MNTTAB, "r")) == NULL) { #endif (void) close(hdl->libzfs_fd); + (void) fprintf(stderr, + gettext("mtab is not present at %s.\n"), MNTTAB); free(hdl); return (NULL); } |