mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
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 <behlendorf1@llnl.gov> Closes #1541
This commit is contained in:
parent
c12936b141
commit
bbb75c1190
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user