diff options
author | Liav A <liavalb@gmail.com> | 2022-08-05 13:30:49 +0300 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-14 01:09:03 +0100 |
commit | c85f81bc9db5f66d44dc68afb5ea6be2cef61525 (patch) | |
tree | b0945be7a2c641c982063df8c7ee4825de068d34 /Userland/Utilities | |
parent | 423dc71cc84bd2096e621f12094098f921a65811 (diff) | |
download | serenity-c85f81bc9db5f66d44dc68afb5ea6be2cef61525.zip |
Utilities/lsblk: Remove Interface Type column
We are going to remove this slice of data from the SysFS later on, so
lsblk must not try to read it.
Diffstat (limited to 'Userland/Utilities')
-rw-r--r-- | Userland/Utilities/lsblk.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Userland/Utilities/lsblk.cpp b/Userland/Utilities/lsblk.cpp index 278ef95202..cf38835fef 100644 --- a/Userland/Utilities/lsblk.cpp +++ b/Userland/Utilities/lsblk.cpp @@ -13,7 +13,7 @@ #include <LibCore/System.h> #include <LibMain/Main.h> -static constexpr StringView format_row = "{:10s}\t{:10s}\t{:10s}\t{:10s}\t{:10s}"sv; +static constexpr StringView format_row = "{:10s}\t{:10s}\t{:10s}\t{:10s}"sv; ErrorOr<int> serenity_main(Main::Arguments arguments) { @@ -31,7 +31,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) return 1; } - outln(format_row, "LUN"sv, "Interface type"sv, "Command set"sv, "Block Size"sv, "Last LBA"sv); + outln(format_row, "LUN"sv, "Command set"sv, "Block Size"sv, "Last LBA"sv); TRY(Core::System::pledge("stdio rpath")); @@ -42,11 +42,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) dbgln("Error: Could not open {}: {}", command_set_file->name(), command_set_file->error_string()); continue; } - auto interface_type_file = Core::File::construct(String::formatted("/sys/devices/storage/{}/interface_type", dir)); - if (!interface_type_file->open(Core::OpenMode::ReadOnly)) { - dbgln("Error: Could not open {}: {}", interface_type_file->name(), interface_type_file->error_string()); - continue; - } auto last_lba_file = Core::File::construct(String::formatted("/sys/devices/storage/{}/last_lba", dir)); if (!last_lba_file->open(Core::OpenMode::ReadOnly)) { dbgln("Error: Could not open {}: {}", last_lba_file->name(), last_lba_file->error_string()); @@ -59,11 +54,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) } String command_set = StringView(command_set_file->read_all().bytes()); - String interface_type = StringView(interface_type_file->read_all().bytes()); String last_lba = StringView(last_lba_file->read_all().bytes()); String sector_size = StringView(sector_size_file->read_all().bytes()); - outln(format_row, dir, interface_type, command_set, sector_size, last_lba); + outln(format_row, dir, command_set, sector_size, last_lba); } return 0; |