zfs/lib
Ned Bass 858219cc4e 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 <behlendorf1@llnl.gov>
Closes #57
2010-09-23 12:14:06 -07:00
..
libavl Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
libefi Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
libnvpair Fix "format not a string literal" warning 2010-09-08 21:39:28 -07:00
libspl Exclude atomic.S source from dist rules 2010-09-10 12:16:43 -07:00
libunicode Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
libuutil Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
libzfs Fix missing vdev names in zpool status output 2010-09-23 12:14:06 -07:00
libzpool Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
Makefile.am Add linux libspl support 2010-08-31 13:41:59 -07:00
Makefile.in Support custom build directories and move includes 2010-09-08 12:38:56 -07:00