HomeFreeBSD

Fix error handling for "zpool online -e".

Description

Fix error handling for "zpool online -e".

The error handling code around zpool_relabel_disk() is either inexistent
or wrong. The function call itself is not checked, and
zpool_relabel_disk() is generating error messages from an unitialized
buffer.

Before:

  1. zpool online -e homez sdb; echo $? `: cannot relabel 'sdb1': unable to open device: 2 0

After:

  1. zpool online -e homez sdb; echo $? cannot expand sdb: cannot relabel 'sdb1': unable to open device: 2 1

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #808

Details

Provenance
Etienne Dechamps <etienne.dechamps@ovh.net>Authored on Jul 6 2012, 1:44 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 12 2012, 3:58 PM
Parents
rGc7f2d69de397: Illumos #1949, #1953
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG8adf48642253: Fix error handling for "zpool online -e". (authored by Etienne Dechamps <etienne.dechamps@ovh.net>).Jul 12 2012, 3:58 PM