mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Oops, I mixed up st_dev and st_rdev in struct stat.
This commit is contained in:
parent
e895d6c48e
commit
0c9a2b1430
Notes:
sideshowbarker
2024-07-19 15:53:05 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/0c9a2b14305
2 changed files with 3 additions and 3 deletions
|
@ -91,13 +91,13 @@ int FileDescriptor::fstat(stat* buffer)
|
|||
if (!metadata.is_valid())
|
||||
return -EIO;
|
||||
|
||||
buffer->st_dev = encoded_device(metadata.major_device, metadata.minor_device);
|
||||
buffer->st_rdev = encoded_device(metadata.major_device, metadata.minor_device);
|
||||
buffer->st_ino = metadata.inode.index();
|
||||
buffer->st_mode = metadata.mode;
|
||||
buffer->st_nlink = metadata.link_count;
|
||||
buffer->st_uid = metadata.uid;
|
||||
buffer->st_gid = metadata.gid;
|
||||
buffer->st_rdev = 0; // FIXME
|
||||
buffer->st_dev = 0; // FIXME
|
||||
buffer->st_size = metadata.size;
|
||||
buffer->st_blksize = metadata.block_size;
|
||||
buffer->st_blocks = metadata.block_count;
|
||||
|
|
|
@ -159,7 +159,7 @@ int do_dir(const char* path)
|
|||
printf(" %4u %4u", st.st_uid, st.st_gid);
|
||||
|
||||
if (S_ISCHR(st.st_mode))
|
||||
printf(" %4u,%4u ", major(st.st_dev), minor(st.st_dev));
|
||||
printf(" %4u,%4u ", major(st.st_rdev), minor(st.st_rdev));
|
||||
else
|
||||
printf(" %10u ", st.st_size);
|
||||
|
||||
|
|
Loading…
Reference in a new issue