Changeset View
Changeset View
Standalone View
Standalone View
stand/libsa/stand.h
Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | |||||
extern struct fs_ops pkgfs_fsops; | extern struct fs_ops pkgfs_fsops; | ||||
extern struct fs_ops efihttp_fsops; | extern struct fs_ops efihttp_fsops; | ||||
/* where values for lseek(2) */ | /* where values for lseek(2) */ | ||||
#define SEEK_SET 0 /* set file offset to offset */ | #define SEEK_SET 0 /* set file offset to offset */ | ||||
#define SEEK_CUR 1 /* set file offset to current plus offset */ | #define SEEK_CUR 1 /* set file offset to current plus offset */ | ||||
#define SEEK_END 2 /* set file offset to EOF plus offset */ | #define SEEK_END 2 /* set file offset to EOF plus offset */ | ||||
struct devdesc; | |||||
imp: These are OBE sine we declare this 6 lines later. | |||||
/* | /* | ||||
* 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_NONE 0 | ||||
#define DEVT_DISK 1 | #define DEVT_DISK 1 | ||||
#define DEVT_NET 2 | #define DEVT_NET 2 | ||||
#define DEVT_CD 3 | #define DEVT_CD 3 | ||||
#define DEVT_ZFS 4 | #define DEVT_ZFS 4 | ||||
#define DEVT_FD 5 | #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, struct devdesc *desc); | ||||
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); | ||||
}; | }; | ||||
/* | /* | ||||
* libstand-supplied device switch | * libstand-supplied device switch | ||||
*/ | */ | ||||
extern struct devsw netdev; | extern struct devsw netdev; | ||||
extern int errno; | extern int errno; | ||||
/* | /* | ||||
* 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_unit; | int d_unit; | ||||
Not Done Inline ActionsThis snuck in... imp: This snuck in...
And I think it's fine now (I fixed how i386_devdesc was declared to use… | |||||
Done Inline ActionsWhoops, sorry, I had screwed up on some squashing and this snuck in from the next commit (D34925) while I was fixing it kevans: Whoops, sorry, I had screwed up on some squashing and this snuck in from the next commit… | |||||
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 */ | ||||
struct fs_ops *f_ops; /* pointer to file system operations */ | struct fs_ops *f_ops; /* pointer to file system operations */ | ||||
▲ Show 20 Lines • Show All 313 Lines • Show Last 20 Lines |
These are OBE sine we declare this 6 lines later.