diff options
author | phk <phk@FreeBSD.org> | 2003-05-04 19:25:48 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-05-04 19:25:48 +0000 |
commit | aa1b7d74dad0878999edfdc7610a90fe86a46a6d (patch) | |
tree | 1932517da46572148a0e24645a054f6371f35a52 | |
parent | f1297dcac658b45bda3dbe6d608b416447e94424 (diff) | |
download | FreeBSD-src-aa1b7d74dad0878999edfdc7610a90fe86a46a6d.zip FreeBSD-src-aa1b7d74dad0878999edfdc7610a90fe86a46a6d.tar.gz |
Add a way to read the current mbroffset from a BSD label class.
-rw-r--r-- | sys/geom/geom_bsd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c index b3be7c8..dc57791 100644 --- a/sys/geom/geom_bsd.c +++ b/sys/geom/geom_bsd.c @@ -692,12 +692,18 @@ g_bsd_config(struct gctl_req *req, struct g_geom *gp, const char *verb) struct h0h0 h0h0; struct g_slicer *gsp; struct g_consumer *cp; + struct g_bsd_softc *ms; i = 0; g_topology_assert(); cp = LIST_FIRST(&gp->consumer); gsp = gp->softc; - if (!strcmp(verb, "write label")) { + ms = gsp->softc; + if (!strcmp(verb, "read mbroffset")) { + error = gctl_set_param(req, "mbroffset", + &ms->mbroffset, sizeof(ms->mbroffset)); + return (error); + } else if (!strcmp(verb, "write label")) { label = gctl_get_paraml(req, "label", LABELSIZE); if (label == NULL) return (EINVAL); |