aboutsummaryrefslogtreecommitdiff
path: root/sbin/bsdlabel/bsdlabel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/bsdlabel/bsdlabel.c')
-rw-r--r--sbin/bsdlabel/bsdlabel.c12
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) {