diff --git a/src/dev/audio/hda/main.c b/src/dev/audio/hda/main.c index cb16bb1..24c063a 100644 --- a/src/dev/audio/hda/main.c +++ b/src/dev/audio/hda/main.c @@ -889,6 +889,8 @@ static void callback(void* ptr, usize len, void* userdata) { sound_ptr = offset(sound_ptr, void*, len); } +static int NUMBER = 0; + static void hda_init(PciDev* dev) { kprintf("hda init\n"); @@ -1012,7 +1014,7 @@ static void hda_init(PciDev* dev) { kprintf("controller ready\n"); - // todo + snprintf(self->snd_dev.generic.name, sizeof(self->snd_dev.generic.name), "hda#%d", NUMBER++); memcpy(self->snd_dev.generic.name, "hda#unknown", sizeof("hda#unknown")); self->snd_dev.create_stream = snd_create_stream; diff --git a/src/dev/storage/CMakeLists.txt b/src/dev/storage/CMakeLists.txt index 31cd356..3078d2f 100644 --- a/src/dev/storage/CMakeLists.txt +++ b/src/dev/storage/CMakeLists.txt @@ -4,5 +4,3 @@ target_sources(crescent PRIVATE gpt.c ) - -add_subdirectory(fs) \ No newline at end of file diff --git a/src/dev/storage/fs/CMakeLists.txt b/src/dev/storage/fs/CMakeLists.txt deleted file mode 100644 index b48de9e..0000000 --- a/src/dev/storage/fs/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -target_sources(crescent PRIVATE fat.c ext2.c) \ No newline at end of file diff --git a/src/dev/storage/gpt.c b/src/dev/storage/gpt.c index 8510c29..e20a28a 100644 --- a/src/dev/storage/gpt.c +++ b/src/dev/storage/gpt.c @@ -1,6 +1,6 @@ #include "gpt.h" #include "assert.h" -#include "dev/storage/fs/fat.h" +#include "fs/fat.h" #include "mbr.h" #include "mem/allocator.h" #include "mem/utils.h" @@ -8,7 +8,7 @@ #include "string.h" #include "types.h" #include "utils/math.h" -#include "dev/storage/fs/ext2.h" +#include "fs/ext2.h" typedef struct { char signature[8]; diff --git a/src/fs/CMakeLists.txt b/src/fs/CMakeLists.txt index e1c40bc..495e238 100644 --- a/src/fs/CMakeLists.txt +++ b/src/fs/CMakeLists.txt @@ -1 +1 @@ -target_sources(crescent PRIVATE vfs.c tar.c) \ No newline at end of file +target_sources(crescent PRIVATE vfs.c tar.c ext2.c fat.c) \ No newline at end of file diff --git a/src/dev/storage/fs/ext2.c b/src/fs/ext2.c similarity index 100% rename from src/dev/storage/fs/ext2.c rename to src/fs/ext2.c diff --git a/src/dev/storage/fs/ext2.h b/src/fs/ext2.h similarity index 100% rename from src/dev/storage/fs/ext2.h rename to src/fs/ext2.h diff --git a/src/dev/storage/fs/fat.c b/src/fs/fat.c similarity index 100% rename from src/dev/storage/fs/fat.c rename to src/fs/fat.c diff --git a/src/dev/storage/fs/fat.h b/src/fs/fat.h similarity index 100% rename from src/dev/storage/fs/fat.h rename to src/fs/fat.h