diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-06-01 13:47:51 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-06-01 13:47:51 +0000 |
commit | 83d771de7837bfdf08b05d70a23117c6d4a63799 (patch) | |
tree | b5cc7f300d62bf1910b246c6ef717532135ce150 /sbin/bsdlabel/bsdlabel.c | |
parent | a6c58fec6c6d666a9b5ce9aa9fde17e492f456f0 (diff) | |
download | src-83d771de7837bfdf08b05d70a23117c6d4a63799.tar.gz src-83d771de7837bfdf08b05d70a23117c6d4a63799.zip |
Simplify the GEOM OAM api: Drop the request type, and let everything
hinge on the "verb" parameter which the class gets to interpret as
it sees fit.
Move the entire request into the kernel and move changed parameters
back when done.
Notes
Notes:
svn path=/head/; revision=115624
Diffstat (limited to 'sbin/bsdlabel/bsdlabel.c')
-rw-r--r-- | sbin/bsdlabel/bsdlabel.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c index a0e3cdb2307a..31e57b7c9146 100644 --- a/sbin/bsdlabel/bsdlabel.c +++ b/sbin/bsdlabel/bsdlabel.c @@ -359,10 +359,10 @@ writelabel(void) fd = open(specname, O_RDWR); if (fd < 0) { - grq = gctl_get_handle(GCTL_CONFIG_GEOM); + grq = gctl_get_handle(); + gctl_ro_param(grq, "verb", -1, "write label"); gctl_ro_param(grq, "class", -1, "BSD"); gctl_ro_param(grq, "geom", -1, dkname); - gctl_ro_param(grq, "verb", -1, "write label"); gctl_ro_param(grq, "label", 148+16*8, bootarea + labeloffset); errstr = gctl_issue(grq); if (errstr != NULL) { @@ -372,10 +372,10 @@ writelabel(void) } gctl_free(grq); if (installboot) { - grq = gctl_get_handle(GCTL_CONFIG_GEOM); + grq = gctl_get_handle(); + gctl_ro_param(grq, "verb", -1, "write bootcode"); gctl_ro_param(grq, "class", -1, "BSD"); gctl_ro_param(grq, "geom", -1, dkname); - gctl_ro_param(grq, "verb", -1, "write bootcode"); gctl_ro_param(grq, "bootcode", BBSIZE, bootarea); errstr = gctl_issue(grq); if (errstr != NULL) { @@ -419,10 +419,10 @@ readlabel(int flag) if (flag && error) errx(1, "%s: no valid label found", specname); - grq = gctl_get_handle(GCTL_CONFIG_GEOM); + grq = gctl_get_handle(); + gctl_ro_param(grq, "verb", -1, "read mbroffset"); gctl_ro_param(grq, "class", -1, "BSD"); gctl_ro_param(grq, "geom", -1, dkname); - gctl_ro_param(grq, "verb", -1, "read mbroffset"); gctl_rw_param(grq, "mbroffset", sizeof(mbroffset), &mbroffset); errstr = gctl_issue(grq); if (errstr != NULL) { |