1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Add a way to read the current mbroffset from a BSD label class.

This commit is contained in:
Poul-Henning Kamp 2003-05-04 19:25:48 +00:00
parent 1ee055e692
commit 7f9e81b703
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114671

View File

@ -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);