git://git.camperquake.de
/
zfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c12936b
)
Add error message for missing /etc/mtab
author
Aaron Fineman
<abyxcos@gmail.com>
Thu, 27 Jun 2013 19:19:25 +0000
(15:19 -0400)
committer
Brian Behlendorf
<behlendorf1@llnl.gov>
Thu, 27 Jun 2013 21:43:37 +0000
(14:43 -0700)
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 <behlendorf1@llnl.gov>
Closes #1541
lib/libzfs/libzfs_util.c
patch
|
blob
|
history
diff --git
a/lib/libzfs/libzfs_util.c
b/lib/libzfs/libzfs_util.c
index
a4e1255
..
5bb88e9
100644
(file)
--- 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);
}