|
Description
|
In zpool_label_disks(), we have:
int
zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, char *name)
{
char path[MAXPATHLEN];
struct dk_gpt *vtoc;
int fd;
size_t resv = EFI_MIN_RESV_SIZE;
uint64_t slice_size;
diskaddr_t start_block;
char errbuf[1024];
...
if ((fd = open(path, O_RDWR | O_NDELAY)) < 0) {
/*
* This shouldn't happen. We've long since verified that this
* is a valid device.
*/
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "cannot "
"label '%s': unable to open device"), name);
return (zfs_error(hdl, EZFS_OPENFAILED, errbuf));
}
...
First off, 'errbuf' is used without being initialized. Second of all,
the error message is supposed to be split into action, errno, and
description. So "cannot label '%s'" should be the argument to
zfs_error(), and "unable to open device" should be the aux string (the
description).
|