mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:47:45 +00:00
SpaceAnalyzer: Replace fprintf(stderr) with warnln()
This commit is contained in:
parent
8625f089bf
commit
a6248101e2
1 changed files with 4 additions and 4 deletions
|
@ -75,13 +75,13 @@ struct MountInfo {
|
||||||
static void fill_mounts(Vector<MountInfo>& output)
|
static void fill_mounts(Vector<MountInfo>& output)
|
||||||
{
|
{
|
||||||
// Output info about currently mounted filesystems.
|
// Output info about currently mounted filesystems.
|
||||||
auto df = Core::File::construct("/proc/df");
|
auto file = Core::File::construct("/proc/df");
|
||||||
if (!df->open(Core::OpenMode::ReadOnly)) {
|
if (!file->open(Core::OpenMode::ReadOnly)) {
|
||||||
fprintf(stderr, "Failed to open /proc/df: %s\n", df->error_string());
|
warnln("Failed to open {}: {}", file->name(), file->error_string());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto content = df->read_all();
|
auto content = file->read_all();
|
||||||
auto json = JsonValue::from_string(content);
|
auto json = JsonValue::from_string(content);
|
||||||
VERIFY(json.has_value());
|
VERIFY(json.has_value());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue