SpaceAnalyzer: Replace fprintf(stderr) with warnln()
This commit is contained in:
parent
8625f089bf
commit
a6248101e2
Notes:
sideshowbarker
2024-07-18 17:06:23 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/a6248101e2f Pull-request: https://github.com/SerenityOS/serenity/pull/7631
1 changed files with 4 additions and 4 deletions
|
@ -75,13 +75,13 @@ struct MountInfo {
|
|||
static void fill_mounts(Vector<MountInfo>& output)
|
||||
{
|
||||
// Output info about currently mounted filesystems.
|
||||
auto df = Core::File::construct("/proc/df");
|
||||
if (!df->open(Core::OpenMode::ReadOnly)) {
|
||||
fprintf(stderr, "Failed to open /proc/df: %s\n", df->error_string());
|
||||
auto file = Core::File::construct("/proc/df");
|
||||
if (!file->open(Core::OpenMode::ReadOnly)) {
|
||||
warnln("Failed to open {}: {}", file->name(), file->error_string());
|
||||
return;
|
||||
}
|
||||
|
||||
auto content = df->read_all();
|
||||
auto content = file->read_all();
|
||||
auto json = JsonValue::from_string(content);
|
||||
VERIFY(json.has_value());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue