Kernel: Fix USB SCSI device naming

This commit is contained in:
2026-07-02 15:21:24 +03:00
parent d8f136a76f
commit 5540bc4147
2 changed files with 5 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ namespace Kernel
const uint64_t m_block_count;
const uint32_t m_block_size;
const char m_name[4];
char m_name[4];
friend class BAN::RefPtr<USBSCSIDevice>;
};

View File

@@ -132,9 +132,12 @@ namespace Kernel
, m_lun(lun)
, m_block_count(block_count)
, m_block_size(block_size)
, m_name { 's', 'd', (char)('a' + minor(m_rdev)), '\0' }
{
m_rdev = scsi_get_rdev();
strcpy(m_name, "sda");
m_name[2] += minor(m_rdev);
}
USBSCSIDevice::~USBSCSIDevice()