summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kernel/FileSystem/FileDescription.cpp2
-rw-r--r--Kernel/UnixTypes.h2
-rw-r--r--Userland/Libraries/LibC/dirent.cpp1
-rw-r--r--Userland/Libraries/LibC/sys/types.h2
-rw-r--r--Userland/Utilities/ls.cpp4
-rw-r--r--Userland/Utilities/stat.cpp2
6 files changed, 7 insertions, 6 deletions
diff --git a/Kernel/FileSystem/FileDescription.cpp b/Kernel/FileSystem/FileDescription.cpp
index a569c6186c..dc9e3c0028 100644
--- a/Kernel/FileSystem/FileDescription.cpp
+++ b/Kernel/FileSystem/FileDescription.cpp
@@ -261,7 +261,7 @@ KResultOr<size_t> FileDescription::get_dir_entries(UserOrKernelBuffer& output_bu
return false;
}
}
- stream << (u32)entry.inode.index().value();
+ stream << (u64)entry.inode.index().value();
stream << m_inode->fs().internal_file_type_to_directory_entry_type(entry);
stream << (u32)entry.name.length();
stream << entry.name.bytes();
diff --git a/Kernel/UnixTypes.h b/Kernel/UnixTypes.h
index fe62781483..1edee66b9e 100644
--- a/Kernel/UnixTypes.h
+++ b/Kernel/UnixTypes.h
@@ -357,7 +357,7 @@ enum {
#define TCSAFLUSH 2
typedef u32 dev_t;
-typedef u32 ino_t;
+typedef u64 ino_t;
typedef u16 mode_t;
typedef u32 nlink_t;
typedef u32 uid_t;
diff --git a/Userland/Libraries/LibC/dirent.cpp b/Userland/Libraries/LibC/dirent.cpp
index d92cf85050..7475d22519 100644
--- a/Userland/Libraries/LibC/dirent.cpp
+++ b/Userland/Libraries/LibC/dirent.cpp
@@ -5,6 +5,7 @@
*/
#include <AK/Assertions.h>
+#include <AK/Format.h>
#include <AK/ScopeGuard.h>
#include <AK/StdLibExtras.h>
#include <AK/Vector.h>
diff --git a/Userland/Libraries/LibC/sys/types.h b/Userland/Libraries/LibC/sys/types.h
index f1d39d02b4..ad21502176 100644
--- a/Userland/Libraries/LibC/sys/types.h
+++ b/Userland/Libraries/LibC/sys/types.h
@@ -32,7 +32,7 @@ typedef char* caddr_t;
typedef int id_t;
-typedef uint32_t ino_t;
+typedef uint64_t ino_t;
typedef int64_t off_t;
typedef uint32_t blkcnt_t;
diff --git a/Userland/Utilities/ls.cpp b/Userland/Utilities/ls.cpp
index 7db7b6b8d8..6d26a92242 100644
--- a/Userland/Utilities/ls.cpp
+++ b/Userland/Utilities/ls.cpp
@@ -279,7 +279,7 @@ static size_t print_name(const struct stat& st, const String& name, const char*
static bool print_filesystem_object(const String& path, const String& name, const struct stat& st)
{
if (flag_show_inode)
- printf("%08u ", st.st_ino);
+ printf("%s ", String::formatted("{}", st.st_ino).characters());
if (S_ISDIR(st.st_mode))
printf("d");
@@ -445,7 +445,7 @@ static bool print_filesystem_object_short(const char* path, const char* name, si
}
if (flag_show_inode)
- printf("%08u ", st.st_ino);
+ printf("%s ", String::formatted("{}", st.st_ino).characters());
*nprinted = print_name(st, name, nullptr, path);
return true;
diff --git a/Userland/Utilities/stat.cpp b/Userland/Utilities/stat.cpp
index f13e34d1d2..61f412b032 100644
--- a/Userland/Utilities/stat.cpp
+++ b/Userland/Utilities/stat.cpp
@@ -26,7 +26,7 @@ static int stat(const char* file, bool should_follow_links)
return 1;
}
printf(" File: %s\n", file);
- printf(" Inode: %u\n", st.st_ino);
+ printf(" Inode: %s\n", String::formatted("{}", st.st_ino).characters());
if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode))
printf(" Device: %u,%u\n", major(st.st_rdev), minor(st.st_rdev));
else