Kernel: Fix ATADevice naming

ATADevice now stores its name instead of using static buffer. Old
static buffer was changing on every name query. I just hadn't noticed
since virtual machine disks were always sda.
This commit is contained in:
2023-10-16 16:52:15 +03:00
parent 0fdf8b6f68
commit c4a640bcb6
2 changed files with 6 additions and 9 deletions

View File

@@ -28,7 +28,7 @@ namespace Kernel
uint64_t sector_count() const { return m_lba_count; }
BAN::StringView model() const { return m_model; }
BAN::StringView name() const;
BAN::StringView name() const { return m_name; }
virtual dev_t rdev() const override { return m_rdev; }
@@ -46,6 +46,7 @@ namespace Kernel
uint32_t m_sector_words;
uint64_t m_lba_count;
char m_model[41];
char m_name[4] {};
const dev_t m_rdev;
};