mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
Improve error message consistency
Signed-off-by: Richard Laager <rlaager@wiktel.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
f4605f07a2
commit
109491a897
@ -2082,7 +2082,7 @@ zpool_relabel_disk(libzfs_handle_t *hdl, const char *path)
|
|||||||
|
|
||||||
if ((fd = open(path, O_RDWR|O_DIRECT)) < 0) {
|
if ((fd = open(path, O_RDWR|O_DIRECT)) < 0) {
|
||||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "cannot "
|
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "cannot "
|
||||||
"relabel '%s': unable to open device"), path);
|
"relabel '%s': unable to open device: %d"), path, errno);
|
||||||
return (zfs_error(hdl, EZFS_OPENFAILED, errbuf));
|
return (zfs_error(hdl, EZFS_OPENFAILED, errbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3763,8 +3763,8 @@ zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, char *name)
|
|||||||
* This shouldn't happen. We've long since verified that this
|
* This shouldn't happen. We've long since verified that this
|
||||||
* is a valid device.
|
* is a valid device.
|
||||||
*/
|
*/
|
||||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "cannot "
|
||||||
"unable to open device '%s': %d"), path, errno);
|
"label '%s': unable to open device: %d"), path, errno);
|
||||||
return (zfs_error(hdl, EZFS_OPENFAILED, errbuf));
|
return (zfs_error(hdl, EZFS_OPENFAILED, errbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3777,8 +3777,8 @@ zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, char *name)
|
|||||||
(void) no_memory(hdl);
|
(void) no_memory(hdl);
|
||||||
|
|
||||||
(void) close(fd);
|
(void) close(fd);
|
||||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "cannot "
|
||||||
"unable to read disk capacity"), name);
|
"label '%s': unable to read disk capacity"), path);
|
||||||
|
|
||||||
return (zfs_error(hdl, EZFS_NOCAP, errbuf));
|
return (zfs_error(hdl, EZFS_NOCAP, errbuf));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user