Skip to content

Commit

Permalink
hda: Fix device name
Browse files Browse the repository at this point in the history
  • Loading branch information
Qwinci committed Oct 22, 2023
1 parent 7c2530d commit 68a4e1c
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/dev/audio/hda/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/dev/storage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ target_sources(crescent PRIVATE

gpt.c
)

add_subdirectory(fs)
1 change: 0 additions & 1 deletion src/dev/storage/fs/CMakeLists.txt

This file was deleted.

4 changes: 2 additions & 2 deletions src/dev/storage/gpt.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#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"
#include "storage.h"
#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];
Expand Down
2 changes: 1 addition & 1 deletion src/fs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
target_sources(crescent PRIVATE vfs.c tar.c)
target_sources(crescent PRIVATE vfs.c tar.c ext2.c fat.c)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 68a4e1c

Please sign in to comment.