mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:07:36 +00:00
LibCore: Keep the raw inode number value in DirectoryEntry
This will be used later on by other userspace programs that need it.
This commit is contained in:
parent
5efb91ec06
commit
93ef955597
2 changed files with 3 additions and 0 deletions
|
@ -68,6 +68,7 @@ DirectoryEntry DirectoryEntry::from_stat(DIR* d, dirent const& de)
|
||||||
return DirectoryEntry {
|
return DirectoryEntry {
|
||||||
.type = directory_entry_type_from_stat(statbuf.st_mode),
|
.type = directory_entry_type_from_stat(statbuf.st_mode),
|
||||||
.name = de.d_name,
|
.name = de.d_name,
|
||||||
|
.inode_number = de.d_ino,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,6 +78,7 @@ DirectoryEntry DirectoryEntry::from_dirent(dirent const& de)
|
||||||
return DirectoryEntry {
|
return DirectoryEntry {
|
||||||
.type = directory_entry_type_from_posix(de.d_type),
|
.type = directory_entry_type_from_posix(de.d_type),
|
||||||
.name = de.d_name,
|
.name = de.d_name,
|
||||||
|
.inode_number = de.d_ino,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -26,6 +26,7 @@ struct DirectoryEntry {
|
||||||
Type type;
|
Type type;
|
||||||
// FIXME: Once we have a special Path string class, use that.
|
// FIXME: Once we have a special Path string class, use that.
|
||||||
DeprecatedString name;
|
DeprecatedString name;
|
||||||
|
ino_t inode_number;
|
||||||
|
|
||||||
static DirectoryEntry from_dirent(dirent const&);
|
static DirectoryEntry from_dirent(dirent const&);
|
||||||
static DirectoryEntry from_stat(DIR*, dirent const&);
|
static DirectoryEntry from_stat(DIR*, dirent const&);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue