Handle disk partitioning
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
#include "spinlock/spinlock.h"
|
||||
#include "ramsd.h"
|
||||
#include "atasd.h"
|
||||
#include "partsd.h"
|
||||
#include "compiler/attr.h"
|
||||
#include "dev/dev.h"
|
||||
|
||||
@ -14,10 +15,11 @@
|
||||
enum {
|
||||
STOREDEV_RAMSD,
|
||||
STOREDEV_ATASD,
|
||||
STOREDEV_PARTSD,
|
||||
};
|
||||
|
||||
UNUSED static const char *storedev_strings[] = {
|
||||
"RAMSD", "ATASD"
|
||||
"RAMSD", "ATASD", "PARTSD",
|
||||
};
|
||||
|
||||
typedef struct StoreDev {
|
||||
@ -35,6 +37,7 @@ typedef struct StoreDev {
|
||||
union {
|
||||
RamSd ramsd;
|
||||
AtaSd atasd;
|
||||
PartSd partsd;
|
||||
} sd;
|
||||
SpinLock spinlock;
|
||||
} StoreDev;
|
||||
@ -48,10 +51,10 @@ extern StoreDevList STOREDEV_LIST;
|
||||
|
||||
void storedev_init(void);
|
||||
|
||||
StoreDev *storedev_create(int32_t sdtype, void *extra);
|
||||
StoreDev *storedev_create(int32_t sdtype, char *name, void *extra);
|
||||
int32_t storedev_delete(StoreDev *sd);
|
||||
|
||||
void storedev_register_dev_entry(StoreDev *sd, int32_t sdtype);
|
||||
void storedev_register_dev_entry(StoreDev *sd, char *name, int32_t sdtype);
|
||||
void storedev_unregister_dev_entry(Dev *dev);
|
||||
|
||||
#endif // STOREDEV_STOREDEV_H_
|
||||
|
||||
Reference in New Issue
Block a user