tty: implement read/write support
This commit is contained in:
@@ -41,12 +41,14 @@ enum device_type {
|
||||
};
|
||||
|
||||
struct device_type_ops {
|
||||
kern_status_t(*read)(struct device *, void *, size_t, size_t *, socks_flags_t);
|
||||
kern_status_t(*write)(struct device *, const void *, size_t, size_t *, socks_flags_t);
|
||||
kern_status_t(*register_device)(struct device *);
|
||||
};
|
||||
|
||||
struct block_device_ops {
|
||||
kern_status_t(*read_blocks)(struct device *, size_t, size_t *, void *, socks_flags_t);
|
||||
kern_status_t(*write_blocks)(struct device *, size_t, size_t *, const void *, socks_flags_t);
|
||||
kern_status_t(*read_blocks)(struct device *, void *, size_t, size_t *, socks_flags_t);
|
||||
kern_status_t(*write_blocks)(struct device *, const void *, size_t, size_t *, socks_flags_t);
|
||||
kern_status_t(*ioctl)(struct device *, unsigned int, void *);
|
||||
};
|
||||
|
||||
@@ -58,8 +60,8 @@ struct net_device_ops {
|
||||
};
|
||||
|
||||
struct char_device_ops {
|
||||
kern_status_t(*read)(struct device *, size_t, size_t *, void *, socks_flags_t);
|
||||
kern_status_t(*write)(struct device *, size_t, size_t *, const void *, socks_flags_t);
|
||||
kern_status_t(*read)(struct device *, void *, size_t, size_t *, socks_flags_t);
|
||||
kern_status_t(*write)(struct device *, const void *, size_t, size_t *, socks_flags_t);
|
||||
};
|
||||
|
||||
struct input_device_ops {
|
||||
|
||||
Reference in New Issue
Block a user