diff options
author | phk <phk@FreeBSD.org> | 2002-10-17 21:39:06 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-17 21:39:06 +0000 |
commit | c9d1c245f8dcfe88be2d4c0056b9f9015905c848 (patch) | |
tree | 78a0890aede5f4088c06b64bba58d99c37e24172 /sys/geom/geom_kern.c | |
parent | 399c4103ecda3c2edb2ae4c6bbc891c191b8750d (diff) | |
download | FreeBSD-src-c9d1c245f8dcfe88be2d4c0056b9f9015905c848.zip FreeBSD-src-c9d1c245f8dcfe88be2d4c0056b9f9015905c848.tar.gz |
Be consistent and return the NUL at the end of kern.geom.conf{xml,dot}.
Spotted by: sam
Diffstat (limited to 'sys/geom/geom_kern.c')
-rw-r--r-- | sys/geom/geom_kern.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/geom/geom_kern.c b/sys/geom/geom_kern.c index a0dc742..e46c66d 100644 --- a/sys/geom/geom_kern.c +++ b/sys/geom/geom_kern.c @@ -173,7 +173,7 @@ sysctl_kern_geom_confdot(SYSCTL_HANDLER_ARGS) do { tsleep(sb, PZERO, "g_dot", hz); } while(!sbuf_done(sb)); - error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb)); + error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); return error; } @@ -190,7 +190,7 @@ sysctl_kern_geom_confxml(SYSCTL_HANDLER_ARGS) do { tsleep(sb, PZERO, "g_xml", hz); } while(!sbuf_done(sb)); - error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb)); + error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); return error; } |