clang-format
This commit is contained in:
@@ -34,21 +34,20 @@
|
||||
* Devices.
|
||||
*/
|
||||
|
||||
|
||||
struct uio; /* in <uio.h> */
|
||||
struct uio; /* in <uio.h> */
|
||||
|
||||
/*
|
||||
* Filesystem-namespace-accessible device.
|
||||
*/
|
||||
struct device {
|
||||
const struct device_ops *d_ops;
|
||||
const struct device_ops *d_ops;
|
||||
|
||||
blkcnt_t d_blocks;
|
||||
blksize_t d_blocksize;
|
||||
blkcnt_t d_blocks;
|
||||
blksize_t d_blocksize;
|
||||
|
||||
dev_t d_devnumber; /* serial number for this device */
|
||||
dev_t d_devnumber; /* serial number for this device */
|
||||
|
||||
void *d_data; /* device-specific data */
|
||||
void *d_data; /* device-specific data */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -58,18 +57,17 @@ struct device {
|
||||
* devop_ioctl - miscellaneous control operations
|
||||
*/
|
||||
struct device_ops {
|
||||
int (*devop_eachopen)(struct device *, int flags_from_open);
|
||||
int (*devop_io)(struct device *, struct uio *);
|
||||
int (*devop_ioctl)(struct device *, int op, userptr_t data);
|
||||
int (*devop_eachopen)(struct device *, int flags_from_open);
|
||||
int (*devop_io)(struct device *, struct uio *);
|
||||
int (*devop_ioctl)(struct device *, int op, userptr_t data);
|
||||
};
|
||||
|
||||
/*
|
||||
* Macros to shorten the calling sequences.
|
||||
*/
|
||||
#define DEVOP_EACHOPEN(d, f) ((d)->d_ops->devop_eachopen(d, f))
|
||||
#define DEVOP_IO(d, u) ((d)->d_ops->devop_io(d, u))
|
||||
#define DEVOP_IOCTL(d, op, p) ((d)->d_ops->devop_ioctl(d, op, p))
|
||||
|
||||
#define DEVOP_EACHOPEN(d, f) ((d)->d_ops->devop_eachopen(d, f))
|
||||
#define DEVOP_IO(d, u) ((d)->d_ops->devop_io(d, u))
|
||||
#define DEVOP_IOCTL(d, op, p) ((d)->d_ops->devop_ioctl(d, op, p))
|
||||
|
||||
/* Create vnode for a vfs-level device. */
|
||||
struct vnode *dev_create_vnode(struct device *dev);
|
||||
@@ -83,5 +81,4 @@ void devnull_create(void);
|
||||
/* Function that kicks off device probe and attach. */
|
||||
void dev_bootstrap(void);
|
||||
|
||||
|
||||
#endif /* _DEVICE_H_ */
|
||||
|
||||
Reference in New Issue
Block a user