Change naming scheme for atasd and ramsd
This commit is contained in:
@ -1,2 +1,2 @@
|
|||||||
print 'Mounting filesystems...\n'
|
print 'Mounting filesystems...\n'
|
||||||
$fs mount -mp system -fs LittleFS -dev atasd-mst -fmt no
|
$fs mount -mp system -fs LittleFS -dev atasd-ch0-M -fmt no
|
||||||
|
|||||||
@ -24,16 +24,15 @@ void storedev_init(void) {
|
|||||||
ata_probe();
|
ata_probe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t ramsd_counter = 0;
|
||||||
|
|
||||||
void storedev_register_dev_entry(StoreDev *sd, int32_t sdtype) {
|
void storedev_register_dev_entry(StoreDev *sd, int32_t sdtype) {
|
||||||
char key[20];
|
char key[20];
|
||||||
hal_memset(key, 0, sizeof(key));
|
|
||||||
|
|
||||||
if (sdtype == STOREDEV_RAMSD) {
|
if (sdtype == STOREDEV_RAMSD) {
|
||||||
char uniq[5];
|
ksprintf(key, "ramsd-%zu", ramsd_counter++);
|
||||||
randcrypto_gen_uniqid(uniq, 4);
|
|
||||||
ksprintf(key, "ramsd-%s", uniq);
|
|
||||||
} else if (sdtype == STOREDEV_ATASD) {
|
} else if (sdtype == STOREDEV_ATASD) {
|
||||||
ksprintf(key, "atasd-%s", sd->sd.atasd.devno == 0x00 ? "mst" : "slv");
|
ksprintf(key, "atasd-ch0-%c", sd->sd.atasd.devno == 0x00 ? 'M' : 'S');
|
||||||
}
|
}
|
||||||
|
|
||||||
spinlock_acquire(&DEVTABLE.spinlock);
|
spinlock_acquire(&DEVTABLE.spinlock);
|
||||||
|
|||||||
Reference in New Issue
Block a user