diff --git a/base/scripts/mount.tb b/base/scripts/mount.tb index e079ce8..c9fa816 100644 --- a/base/scripts/mount.tb +++ b/base/scripts/mount.tb @@ -1,2 +1,2 @@ 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 diff --git a/kernel/storedev/storedev.c b/kernel/storedev/storedev.c index 2902418..6d95555 100644 --- a/kernel/storedev/storedev.c +++ b/kernel/storedev/storedev.c @@ -24,16 +24,15 @@ void storedev_init(void) { ata_probe(); } +size_t ramsd_counter = 0; + void storedev_register_dev_entry(StoreDev *sd, int32_t sdtype) { char key[20]; - hal_memset(key, 0, sizeof(key)); if (sdtype == STOREDEV_RAMSD) { - char uniq[5]; - randcrypto_gen_uniqid(uniq, 4); - ksprintf(key, "ramsd-%s", uniq); + ksprintf(key, "ramsd-%zu", ramsd_counter++); } 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);