Changeset View
Changeset View
Standalone View
Standalone View
stand/libsa/stand.h
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | |||||
#define SEEK_END 2 /* set file offset to EOF plus offset */ | #define SEEK_END 2 /* set file offset to EOF plus offset */ | ||||
/* | /* | ||||
* Device switch | * Device switch | ||||
*/ | */ | ||||
struct devsw { | struct devsw { | ||||
const char dv_name[8]; | const char dv_name[8]; | ||||
int dv_type; /* opaque type constant, arch-dependant */ | int dv_type; /* opaque type constant, arch-dependant */ | ||||
#define DEVT_NONE 0 | |||||
#define DEVT_DISK 1 | |||||
#define DEVT_NET 2 | |||||
#define DEVT_CD 3 | |||||
#define DEVT_ZFS 4 | |||||
#define DEVT_FD 5 | |||||
int (*dv_init)(void); /* early probe call */ | int (*dv_init)(void); /* early probe call */ | ||||
int (*dv_strategy)(void *devdata, int rw, daddr_t blk, | int (*dv_strategy)(void *devdata, int rw, daddr_t blk, | ||||
size_t size, char *buf, size_t *rsize); | size_t size, char *buf, size_t *rsize); | ||||
int (*dv_open)(struct open_file *f, ...); | int (*dv_open)(struct open_file *f, ...); | ||||
int (*dv_close)(struct open_file *f); | int (*dv_close)(struct open_file *f); | ||||
int (*dv_ioctl)(struct open_file *f, u_long cmd, void *data); | int (*dv_ioctl)(struct open_file *f, u_long cmd, void *data); | ||||
int (*dv_print)(int verbose); /* print device information */ | int (*dv_print)(int verbose); /* print device information */ | ||||
void (*dv_cleanup)(void); | void (*dv_cleanup)(void); | ||||
Show All 9 Lines | |||||
/* | /* | ||||
* Generic device specifier; architecture-dependent | * Generic device specifier; architecture-dependent | ||||
* versions may be larger, but should be allowed to | * versions may be larger, but should be allowed to | ||||
* overlap. | * overlap. | ||||
*/ | */ | ||||
struct devdesc | struct devdesc | ||||
{ | { | ||||
struct devsw *d_dev; | struct devsw *d_dev; | ||||
int d_type; | |||||
#define DEVT_NONE 0 | |||||
#define DEVT_DISK 1 | |||||
#define DEVT_NET 2 | |||||
#define DEVT_CD 3 | |||||
#define DEVT_ZFS 4 | |||||
#define DEVT_FD 5 | |||||
int d_unit; | int d_unit; | ||||
void *d_opendata; | void *d_opendata; | ||||
}; | }; | ||||
struct open_file { | struct open_file { | ||||
int f_flags; /* see F_* below */ | int f_flags; /* see F_* below */ | ||||
struct devsw *f_dev; /* pointer to device operations */ | struct devsw *f_dev; /* pointer to device operations */ | ||||
void *f_devdata; /* device specific data */ | void *f_devdata; /* device specific data */ | ||||
▲ Show 20 Lines • Show All 217 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
extern void exit(int) __dead2; | extern void exit(int) __dead2; | ||||
extern int getchar(void); | extern int getchar(void); | ||||
extern int ischar(void); | extern int ischar(void); | ||||
extern void putchar(int); | extern void putchar(int); | ||||
extern int devopen(struct open_file *, const char *, const char **); | extern int devopen(struct open_file *, const char *, const char **); | ||||
extern int devclose(struct open_file *f); | extern int devclose(struct open_file *f); | ||||
extern void panic(const char *, ...) __dead2 __printflike(1, 2); | extern void panic(const char *, ...) __dead2 __printflike(1, 2); | ||||
extern void panic_action(void) __weak_symbol __dead2; | extern void panic_action(void) __weak_symbol __dead2; | ||||
tsoome: are your sources a bit old? getsecs() seems to be there already... | |||||
Done Inline ActionsI've already merged this part of the diffs for other things. I published this review in January. imp: I've already merged this part of the diffs for other things. I published this review in January. | |||||
extern time_t getsecs(void); | extern time_t getsecs(void); | ||||
extern struct fs_ops *file_system[]; | extern struct fs_ops *file_system[]; | ||||
extern struct fs_ops *exclusive_file_system; | extern struct fs_ops *exclusive_file_system; | ||||
extern struct devsw *devsw[]; | extern struct devsw *devsw[]; | ||||
/* | /* | ||||
* Expose byteorder(3) functions. | * Expose byteorder(3) functions. | ||||
*/ | */ | ||||
Show All 34 Lines |
are your sources a bit old? getsecs() seems to be there already...