Files
magenta/dev/block.c
T

20 lines
341 B
C
Raw Normal View History

2023-04-03 16:59:14 +01:00
#include <socks/device.h>
struct block_device *block_device_create(void)
{
struct device *dev = device_alloc();
if (!dev) {
return NULL;
}
dev->dev_type = DEV_TYPE_BLOCK;
2023-04-03 16:59:14 +01:00
return BLOCK_DEVICE(dev);
}
2023-06-10 13:21:42 +01:00
struct block_device *block_device_from_generic(struct device *dev)
{
dev->dev_type = DEV_TYPE_BLOCK;
return BLOCK_DEVICE(dev);
}