diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2005-04-05 19:45:07 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2005-04-05 19:45:07 +0000 |
commit | 3531dcb24f56d56bea9272d19f91572f99af1092 (patch) | |
tree | e44a7f33d20f5626ce1a444946fecb42a4d52d6b /sbin/bioctl/bioctl.h | |
parent | 89c5196820bb38412fa7d291f3a10dd4dfbda71d (diff) |
clean up enumeration.
properly print inquiry data.
identify devices bioctl cares about.
Diffstat (limited to 'sbin/bioctl/bioctl.h')
-rw-r--r-- | sbin/bioctl/bioctl.h | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/sbin/bioctl/bioctl.h b/sbin/bioctl/bioctl.h index 6dbec8aeb82..8ca7eff4c17 100644 --- a/sbin/bioctl/bioctl.h +++ b/sbin/bioctl/bioctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bioctl.h,v 1.2 2005/04/04 22:43:07 marco Exp $ */ +/* $OpenBSD: bioctl.h,v 1.3 2005/04/05 19:45:06 marco Exp $ */ /* * Copyright (c) 2004, 2005 Marco Peereboom * All rights reserved. @@ -28,10 +28,23 @@ #ifndef _BIOCTL_H_ #define _BIOCTL_H_ -#define F_READCAP 0x01 -#define F_ENUM 0x02 -#define F_TUR 0x04 -#define F_INQUIRY 0x08 +/* misc defines */ +#define INQSIZE (36) + +#define S_TERA (1099511627776llu) +#define S_GIGA (1073741824llu) +#define S_MEGA (1048576llu) +#define S_KILO (1024llu) + +/* functions */ +#define F_READCAP (0x01) +#define F_ENUM (0x02) +#define F_TUR (0x04) +#define F_INQUIRY (0x08) + +/* flags */ +#define F_SILENCE (0x00) +#define F_NOISY (0x01) #define PARSELIST (0x8000000000000000llu) @@ -45,6 +58,7 @@ struct dev { u_int16_t id; u_int8_t channel; u_int8_t target; + u_int8_t type; u_int64_t capacity; }; @@ -53,6 +67,8 @@ void cleanup(void); u_int64_t parse_passthru(char *); void parse_devlist(char *); void print_sense(u_int8_t *, u_int8_t); +void print_inquiry(u_int8_t, u_int8_t*, u_int8_t); +void print_cap(u_int64_t); int bio_get_capabilities(bioc_capabilities *); void bio_alarm(char *); @@ -61,7 +77,7 @@ void bio_ping(void); void bio_startstop(char *, u_int8_t, u_int8_t); void bio_status(void); u_int64_t bio_pt_readcap(u_int8_t, u_int8_t); -u_int32_t bio_pt_inquire(u_int8_t, u_int8_t, u_int8_t *); +u_int32_t bio_pt_inquire(u_int8_t, u_int8_t, u_int8_t, u_int8_t *); u_int32_t bio_pt_tur(u_int8_t, u_int8_t); void bio_pt_enum(void); |