Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/mdioctl.h
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | struct md_ioctl { | ||||
char *md_file; /* pathname of file to mount */ | char *md_file; /* pathname of file to mount */ | ||||
off_t md_mediasize; /* size of disk in bytes */ | off_t md_mediasize; /* size of disk in bytes */ | ||||
unsigned md_sectorsize; /* sectorsize */ | unsigned md_sectorsize; /* sectorsize */ | ||||
unsigned md_options; /* options */ | unsigned md_options; /* options */ | ||||
u_int64_t md_base; /* base address */ | u_int64_t md_base; /* base address */ | ||||
int md_fwheads; /* firmware heads */ | int md_fwheads; /* firmware heads */ | ||||
int md_fwsectors; /* firmware sectors */ | int md_fwsectors; /* firmware sectors */ | ||||
char *md_label; /* label of the device */ | char *md_label; /* label of the device */ | ||||
int md_pad[MDNPAD]; /* storage for MDIOCLIST */ | int md_pad[MDNPAD]; /* padding */ | ||||
}; | }; | ||||
#define MD_NAME "md" | #define MD_NAME "md" | ||||
#define MDCTL_NAME "mdctl" | #define MDCTL_NAME "mdctl" | ||||
#define MDIOVERSION 0 | #define MDIOVERSION 0 | ||||
/* | /* | ||||
* Before you can use a unit, it must be configured with MDIOCSET. | * Before you can use a unit, it must be configured with MDIOCSET. | ||||
* The configuration persists across opens and closes of the device; | * The configuration persists across opens and closes of the device; | ||||
* an MDIOCCLR must be used to reset a configuration. An attempt to | * an MDIOCCLR must be used to reset a configuration. An attempt to | ||||
* MDIOCSET an already active unit will return EBUSY. | * MDIOCSET an already active unit will return EBUSY. | ||||
*/ | */ | ||||
#define MDIOCATTACH _IOWR('m', 0, struct md_ioctl) /* attach disk */ | #define MDIOCATTACH _IOWR('m', 0, struct md_ioctl) /* attach disk */ | ||||
#define MDIOCDETACH _IOWR('m', 1, struct md_ioctl) /* detach disk */ | #define MDIOCDETACH _IOWR('m', 1, struct md_ioctl) /* detach disk */ | ||||
#define MDIOCQUERY _IOWR('m', 2, struct md_ioctl) /* query status */ | #define MDIOCQUERY _IOWR('m', 2, struct md_ioctl) /* query status */ | ||||
#define MDIOCLIST _IOWR('m', 3, struct md_ioctl) /* query status */ | |||||
#define MDIOCRESIZE _IOWR('m', 4, struct md_ioctl) /* resize disk */ | #define MDIOCRESIZE _IOWR('m', 4, struct md_ioctl) /* resize disk */ | ||||
#define MD_CLUSTER 0x01 /* Don't cluster */ | #define MD_CLUSTER 0x01 /* Don't cluster */ | ||||
#define MD_RESERVE 0x02 /* Pre-reserve swap */ | #define MD_RESERVE 0x02 /* Pre-reserve swap */ | ||||
#define MD_AUTOUNIT 0x04 /* Assign next free unit */ | #define MD_AUTOUNIT 0x04 /* Assign next free unit */ | ||||
#define MD_READONLY 0x08 /* Readonly mode */ | #define MD_READONLY 0x08 /* Readonly mode */ | ||||
#define MD_COMPRESS 0x10 /* Compression mode */ | #define MD_COMPRESS 0x10 /* Compression mode */ | ||||
#define MD_FORCE 0x20 /* Don't try to prevent foot-shooting */ | #define MD_FORCE 0x20 /* Don't try to prevent foot-shooting */ | ||||
#define MD_ASYNC 0x40 /* Asynchronous mode */ | #define MD_ASYNC 0x40 /* Asynchronous mode */ | ||||
#define MD_VERIFY 0x80 /* Open file with O_VERIFY (vnode only) */ | #define MD_VERIFY 0x80 /* Open file with O_VERIFY (vnode only) */ | ||||
#define MD_CACHE 0x100 /* Cache vnode data */ | #define MD_CACHE 0x100 /* Cache vnode data */ | ||||
#endif /* _SYS_MDIOCTL_H_*/ | #endif /* _SYS_MDIOCTL_H_*/ |