summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-07 02:15:10 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-08 00:35:27 +0100
commita7f1f1c34b99ad2bad25111746725c3736f9442f (patch)
tree7abde4d6302983a25eb3a95689e5a78ea1e405a5 /Userland/Utilities
parentfac25501436dc3c85c0cb482942173240e94a5e4 (diff)
downloadserenity-a7f1f1c34b99ad2bad25111746725c3736f9442f.zip
LibCore: Use ErrorOr<T> for Core::File::open()
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/arp.cpp1
-rw-r--r--Userland/Utilities/cksum.cpp1
-rw-r--r--Userland/Utilities/errno.cpp2
-rw-r--r--Userland/Utilities/hexdump.cpp1
-rw-r--r--Userland/Utilities/mv.cpp1
-rw-r--r--Userland/Utilities/sql.cpp2
6 files changed, 6 insertions, 2 deletions
diff --git a/Userland/Utilities/arp.cpp b/Userland/Utilities/arp.cpp
index 11837795ed..d19a89140d 100644
--- a/Userland/Utilities/arp.cpp
+++ b/Userland/Utilities/arp.cpp
@@ -16,6 +16,7 @@
#include <net/if_arp.h>
#include <net/route.h>
#include <netinet/in.h>
+#include <string.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <unistd.h>
diff --git a/Userland/Utilities/cksum.cpp b/Userland/Utilities/cksum.cpp
index 46250a664c..be7a6d3711 100644
--- a/Userland/Utilities/cksum.cpp
+++ b/Userland/Utilities/cksum.cpp
@@ -8,6 +8,7 @@
#include <LibCore/File.h>
#include <LibCrypto/Checksum/Adler32.h>
#include <LibCrypto/Checksum/CRC32.h>
+#include <string.h>
int main(int argc, char** argv)
{
diff --git a/Userland/Utilities/errno.cpp b/Userland/Utilities/errno.cpp
index a95885914a..7618d4c3e5 100644
--- a/Userland/Utilities/errno.cpp
+++ b/Userland/Utilities/errno.cpp
@@ -5,7 +5,7 @@
*/
#include <LibCore/ArgsParser.h>
-#include <LibCore/File.h>
+#include <string.h>
int main(int argc, char** argv)
{
diff --git a/Userland/Utilities/hexdump.cpp b/Userland/Utilities/hexdump.cpp
index f14eb43a1b..2a8c08aff3 100644
--- a/Userland/Utilities/hexdump.cpp
+++ b/Userland/Utilities/hexdump.cpp
@@ -8,6 +8,7 @@
#include <LibCore/ArgsParser.h>
#include <LibCore/File.h>
#include <ctype.h>
+#include <string.h>
static constexpr size_t LINE_LENGTH_BYTES = 16;
diff --git a/Userland/Utilities/mv.cpp b/Userland/Utilities/mv.cpp
index 29f607d2be..56cc52343e 100644
--- a/Userland/Utilities/mv.cpp
+++ b/Userland/Utilities/mv.cpp
@@ -9,6 +9,7 @@
#include <LibCore/ArgsParser.h>
#include <LibCore/File.h>
#include <stdio.h>
+#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
diff --git a/Userland/Utilities/sql.cpp b/Userland/Utilities/sql.cpp
index d0ae3ab87d..b078b728bd 100644
--- a/Userland/Utilities/sql.cpp
+++ b/Userland/Utilities/sql.cpp
@@ -178,7 +178,7 @@ private:
auto file_name = m_input_file_chain.take_first();
auto file_or_error = Core::File::open(file_name, Core::OpenMode::ReadOnly);
if (file_or_error.is_error()) {
- warnln("Input file {} could not be opened: {}", file_name, file_or_error.error().string());
+ warnln("Input file {} could not be opened: {}", file_name, file_or_error.error());
return {};
}
m_input_file = file_or_error.value();