summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_apple.c
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2004-04-01 01:33:37 +0000
committergrehan <grehan@FreeBSD.org>2004-04-01 01:33:37 +0000
commit1101a7ee8799bcd8e594454efd47d5c384257b67 (patch)
treee988f33c6f477cab5c3ca7287ac9e026af700609 /sys/geom/geom_apple.c
parentbae4e38c197f464c4bffe7037d5d491e462105b0 (diff)
downloadFreeBSD-src-1101a7ee8799bcd8e594454efd47d5c384257b67.zip
FreeBSD-src-1101a7ee8799bcd8e594454efd47d5c384257b67.tar.gz
Move the name attribute to the end of the conftxt line to simplify
libdisk parsing (the name may be empty, or contain spaces). Submitted by: Suleiman Souhlal <refugee@segfaulted.com>
Diffstat (limited to 'sys/geom/geom_apple.c')
-rw-r--r--sys/geom/geom_apple.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/geom/geom_apple.c b/sys/geom/geom_apple.c
index f076a3a..a1e8bc2 100644
--- a/sys/geom/geom_apple.c
+++ b/sys/geom/geom_apple.c
@@ -116,11 +116,13 @@ g_apple_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp,
mp = gsp->softc;
g_slice_dumpconf(sb, indent, gp, cp, pp);
if (pp != NULL) {
- if (indent == NULL)
- sbuf_printf(sb, " n %s ty %s",
- mp->apmpart[pp->index].am_name,
+ if (indent == NULL) {
+ sbuf_printf(sb, " ty %s",
mp->apmpart[pp->index].am_type);
- else {
+ if (*mp->apmpart[pp->index].am_name)
+ sbuf_printf(sb, " sn %s",
+ mp->apmpart[pp->index].am_name);
+ } else {
sbuf_printf(sb, "%s<name>%s</name>\n", indent,
mp->apmpart[pp->index].am_name);
sbuf_printf(sb, "%s<type>%s</type>\n", indent,
OpenPOWER on IntegriCloud