diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-01-11 22:32:20 +0200 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2022-01-12 16:09:09 +0200 |
commit | 4b74f2e3ecc89a57a56bfbcc907126db7f4ee78d (patch) | |
tree | f165c596ed82f1ca9c480efb6457934c066ed3dc /Kernel/Storage | |
parent | c92753a686a31cefde7058c388bc7eb081be28e4 (diff) | |
download | serenity-4b74f2e3ecc89a57a56bfbcc907126db7f4ee78d.zip |
Kernel: Convert NVMeNameSpace::try_create() to KString
Diffstat (limited to 'Kernel/Storage')
-rw-r--r-- | Kernel/Storage/NVMe/NVMeNameSpace.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/Storage/NVMe/NVMeNameSpace.cpp b/Kernel/Storage/NVMe/NVMeNameSpace.cpp index 7df86434ae..77a8b70e5f 100644 --- a/Kernel/Storage/NVMe/NVMeNameSpace.cpp +++ b/Kernel/Storage/NVMe/NVMeNameSpace.cpp @@ -16,8 +16,7 @@ ErrorOr<NonnullRefPtr<NVMeNameSpace>> NVMeNameSpace::try_create(NonnullRefPtrVec { auto minor_number = StorageManagement::generate_storage_minor_number(); auto major_number = StorageManagement::storage_type_major_number(); - auto device_name = String::formatted("nvme{:d}n{:d}", controller_id, nsid); - auto device_name_kstring = KString::must_create(device_name.view()); + auto device_name_kstring = TRY(KString::formatted("nvme{:d}n{:d}", controller_id, nsid)); auto device = TRY(DeviceManagement::try_create_device<NVMeNameSpace>(queues, storage_size, lba_size, major_number.value(), minor_number.value(), nsid, move(device_name_kstring))); return device; |