diff options
author | mav <mav@FreeBSD.org> | 2013-08-24 09:42:14 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2013-08-24 09:42:14 +0000 |
commit | e8031ce26c0c12d1c7b4c0eb69a6887d48355ccf (patch) | |
tree | 724c9efe931c745ab377f18541d3a299e6100904 /sys/geom/geom_disk.c | |
parent | 281a193b5361cf3955f69760d10d8bb1e29651c7 (diff) | |
download | FreeBSD-src-e8031ce26c0c12d1c7b4c0eb69a6887d48355ccf.zip FreeBSD-src-e8031ce26c0c12d1c7b4c0eb69a6887d48355ccf.tar.gz |
Add new attribute lunname to report only textual LUN-specific device IDs.
While lunid attribute prefers to report numeric ones, having both may be
useful in some situations.
Diffstat (limited to 'sys/geom/geom_disk.c')
-rw-r--r-- | sys/geom/geom_disk.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index 60cff73..732b35d 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -460,6 +460,12 @@ g_disk_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g if (dp->d_getattr(bp) == 0) sbuf_printf(sb, "%s<lunid>%s</lunid>\n", indent, buf); + bp->bio_attribute = "GEOM::lunname"; + bp->bio_length = DISK_IDENT_SIZE; + bp->bio_data = buf; + if (dp->d_getattr(bp) == 0) + sbuf_printf(sb, "%s<lunname>%s</lunname>\n", + indent, buf); g_destroy_bio(bp); g_free(buf); } else |