diff options
author | phk <phk@FreeBSD.org> | 2003-06-01 13:47:51 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-06-01 13:47:51 +0000 |
commit | 069191fcbf030ae2966ebec47a4080756e9cd7f2 (patch) | |
tree | b5cc7f300d62bf1910b246c6ef717532135ce150 /sbin/sunlabel | |
parent | 5a2388f470b87f347bd60da1d099299e1a3ed609 (diff) | |
download | FreeBSD-src-069191fcbf030ae2966ebec47a4080756e9cd7f2.zip FreeBSD-src-069191fcbf030ae2966ebec47a4080756e9cd7f2.tar.gz |
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.
Diffstat (limited to 'sbin/sunlabel')
-rw-r--r-- | sbin/sunlabel/sunlabel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/sunlabel/sunlabel.c b/sbin/sunlabel/sunlabel.c index 08e6745..1de2562 100644 --- a/sbin/sunlabel/sunlabel.c +++ b/sbin/sunlabel/sunlabel.c @@ -352,20 +352,20 @@ write_label(struct sun_disklabel *sl, const char *disk, const char *bootpath) snprintf(path, sizeof(path), "%s%s", _PATH_DEV, disk); fd = open(path, 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, "SUN"); gctl_ro_param(grq, "geom", -1, disk); - gctl_ro_param(grq, "verb", -1, "write label"); gctl_ro_param(grq, "label", sizeof buf, buf); errstr = gctl_issue(grq); if (errstr != NULL) errx(1, "%s", errstr); gctl_free(grq); if (Bflag) { - 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, "SUN"); gctl_ro_param(grq, "geom", -1, disk); - gctl_ro_param(grq, "verb", -1, "write bootcode"); gctl_ro_param(grq, "bootcode", sizeof boot, boot); errstr = gctl_issue(grq); if (errstr != NULL) |