mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:34:57 +00:00
stat: Show the device ID for the given file
This commit is contained in:
parent
ad984ba522
commit
3ee12ffa8f
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ static ErrorOr<int> stat(StringView file, bool should_follow_links)
|
|||
{
|
||||
auto st = TRY(should_follow_links ? Core::System::stat(file) : Core::System::lstat(file));
|
||||
outln(" File: {}", file);
|
||||
outln(" Device: {}", st.st_dev);
|
||||
outln(" Inode: {}", st.st_ino);
|
||||
if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode))
|
||||
outln(" Device: {},{}", major(st.st_rdev), minor(st.st_rdev));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue