dev: implement block device registration

This commit is contained in:
2023-07-08 15:55:43 +01:00
parent ce40a4f57d
commit d9b9c0d4e7
4 changed files with 58 additions and 1 deletions

View File

@@ -20,13 +20,14 @@ static kern_status_t device_object_get_child_named(struct object *, const char *
extern kern_status_t init_driver_tree(void);
extern struct device_type_ops char_type_ops;
extern struct device_type_ops block_type_ops;
extern struct device_type_ops input_type_ops;
extern struct device_type_ops framebuffer_type_ops;
extern struct device_type_ops bus_type_ops;
static struct device_type_ops *type_ops[] = {
[DEV_TYPE_UNKNOWN] = NULL,
[DEV_TYPE_BLOCK] = NULL,
[DEV_TYPE_BLOCK] = &block_type_ops,
[DEV_TYPE_CHAR] = &char_type_ops,
[DEV_TYPE_NET] = NULL,
[DEV_TYPE_INPUT] = &input_type_ops,