diff options
author | Ned Bass <[email protected]> | 2010-09-22 18:53:59 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-09-23 12:14:06 -0700 |
commit | 858219cc4e44aea8373c56a94380f5be53026b38 (patch) | |
tree | 8ad9174d44c0cc966a0b868373917a6cd84e964f /config | |
parent | 368f4c10aec9da58738750cf33de6d12e4fcb500 (diff) |
Fix missing vdev names in zpool status output
Top-level vdev names in zpool status output should follow a <type-id> naming
convention. In the case of raidz devices, the type portion of the name was
missing.
This commit fixes a bug in zpool_vdev_name() where in this snprintf call
(void) snprintf(buf, sizeof (buf), "%s-%llu", path,
(u_longlong_t)id);
buf and path may point to the same location. The result is that buf ends up
containing only the "-id" part. This only occurred for raidz devices because
the code for appending the parity level to the type string stored its result in
buf then set path to point there. To fix this we allocate a new temporary
buffer on the stack instead of reusing buf.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #57
Diffstat (limited to 'config')
0 files changed, 0 insertions, 0 deletions