LibC: add function declarations to sys/stat.h
This commit is contained in:
@@ -46,8 +46,8 @@ namespace Kernel
|
||||
BAN::ErrorOr<size_t> write(int fd, const void* buffer, size_t offset, size_t count);
|
||||
BAN::ErrorOr<void> creat(BAN::StringView name, mode_t);
|
||||
|
||||
BAN::ErrorOr<void> fstat(int fd, stat*);
|
||||
BAN::ErrorOr<void> stat(BAN::StringView path, stat*);
|
||||
BAN::ErrorOr<void> fstat(int fd, struct stat*);
|
||||
BAN::ErrorOr<void> stat(BAN::StringView path, struct stat*);
|
||||
|
||||
BAN::ErrorOr<void> mount(BAN::StringView source, BAN::StringView target);
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Kernel
|
||||
int fd = TRY(Process::current().open(path, O_RDONLY));
|
||||
BAN::ScopeGuard _([fd] { MUST(Process::current().close(fd)); });
|
||||
|
||||
stat st;
|
||||
struct stat st;
|
||||
TRY(Process::current().fstat(fd, &st));
|
||||
|
||||
BAN::Vector<uint8_t> file_data;
|
||||
|
||||
@@ -522,7 +522,7 @@ argument_done:
|
||||
TRY(entry_prefix.push_back('/'));
|
||||
for (const auto& entry : all_entries)
|
||||
{
|
||||
stat st;
|
||||
struct stat st;
|
||||
|
||||
BAN::String entry_path;
|
||||
TRY(entry_path.append(entry_prefix));
|
||||
@@ -572,7 +572,7 @@ argument_done:
|
||||
return {};
|
||||
}
|
||||
|
||||
stat st;
|
||||
struct stat st;
|
||||
TRY(Process::current().stat(arguments[1], &st));
|
||||
|
||||
Inode::Mode mode { st.st_mode };
|
||||
|
||||
Reference in New Issue
Block a user