aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Laager <[email protected]>2012-04-09 16:59:37 -0500
committerBrian Behlendorf <[email protected]>2012-04-11 10:43:17 -0700
commit109491a8976ec6f3fef74ee16bc16f64c34332af (patch)
treef594ffecb990a720b5267b0b3de619284242ba97
parentf4605f07a2901566c9d4ae84e7c17e3ba827ce8a (diff)
Improve error message consistency
Signed-off-by: Richard Laager <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
-rw-r--r--lib/libzfs/libzfs_pool.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c
index 311def6b6..0a2dca0ad 100644
--- a/lib/libzfs/libzfs_pool.c
+++ b/lib/libzfs/libzfs_pool.c
@@ -2082,7 +2082,7 @@ zpool_relabel_disk(libzfs_handle_t *hdl, const char *path)
if ((fd = open(path, O_RDWR|O_DIRECT)) < 0) {
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));
}
@@ -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
* is a valid device.
*/
- zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "unable to open device '%s': %d"), path, errno);
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "cannot "
+ "label '%s': unable to open device: %d"), path, errno);
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) close(fd);
- zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "unable to read disk capacity"), name);
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "cannot "
+ "label '%s': unable to read disk capacity"), path);
return (zfs_error(hdl, EZFS_NOCAP, errbuf));
}