diff options
author | phk <phk@FreeBSD.org> | 2003-03-27 14:35:00 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-03-27 14:35:00 +0000 |
commit | 2d56ed957aaef6ee5d66bcc7c86d7832b4658de5 (patch) | |
tree | 84b36ca01e05be70dbdac8a6aee81afa4b8f1eaf /sys/geom/geom_ext.h | |
parent | 5447a01760d39222ce6958c12e893d7f8188883c (diff) | |
download | FreeBSD-src-2d56ed957aaef6ee5d66bcc7c86d7832b4658de5.zip FreeBSD-src-2d56ed957aaef6ee5d66bcc7c86d7832b4658de5.tar.gz |
Run a revision on the OAM api.
Use prefix gctl_ systematically.
Add flag with access perms for each argument.
Add ro/rw versions of argument building functions.
General cleanup.
Diffstat (limited to 'sys/geom/geom_ext.h')
-rw-r--r-- | sys/geom/geom_ext.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sys/geom/geom_ext.h b/sys/geom/geom_ext.h index 8cc795c..a48fc0b 100644 --- a/sys/geom/geom_ext.h +++ b/sys/geom/geom_ext.h @@ -40,26 +40,32 @@ #include <sys/ioccom.h> #include <geom/geom_ctl.h> -struct geom_ctl_req_arg { +struct gctl_req_arg { u_int nlen; char *name; off_t offset; + int flag; int len; void *value; }; -struct geom_ctl_req { +#define GCTL_PARAM_RD 1 /* Must match VM_PROT_READ */ +#define GCTL_PARAM_WR 2 /* Must match VM_PROT_WRITE */ +#define GCTL_PARAM_RW (GCTL_PARAM_RD | GCTL_PARAM_WR) +#define GCTL_PARAM_ASCII 4 + +struct gctl_req { u_int version; u_int serial; - enum geom_ctl_request request; + enum gctl_request request; u_int narg; - struct geom_ctl_req_arg *arg; + struct gctl_req_arg *arg; u_int lerror; char *error; - struct geom_ctl_req_table *reqt; + struct gctl_req_table *reqt; }; -#define GEOM_CTL _IOW('G', GEOM_CTL_VERSION, struct geom_ctl_req) +#define GEOM_CTL _IOW('G', GCTL_VERSION, struct gctl_req) #define PATH_GEOM_CTL "geom.ctl" |