mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 15:18:20 +00:00
vfs/tar: return inode numbers of null records
The tar vfs plugin returns an inode value of zero and a type directory for null records, which wrongly triggers the file-system loop detection of the find utility. This patch returns the node pointer as inode value instead, which is a unique value. Fixes #3695
This commit is contained in:
@ -610,8 +610,14 @@ class Vfs::Tar_file_system : public File_system
|
|||||||
return STAT_ERR_NO_ENTRY;
|
return STAT_ERR_NO_ENTRY;
|
||||||
|
|
||||||
if (!node_ptr->record) {
|
if (!node_ptr->record) {
|
||||||
out.type = Node_type::DIRECTORY;
|
out = {
|
||||||
out.rwx = Node_rwx::rx();
|
.size = 0,
|
||||||
|
.type = Node_type::DIRECTORY,
|
||||||
|
.rwx = Node_rwx::rx(),
|
||||||
|
.inode = (Genode::addr_t)node_ptr,
|
||||||
|
.device = (Genode::addr_t)this,
|
||||||
|
.modification_time = { }
|
||||||
|
};
|
||||||
return STAT_OK;
|
return STAT_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user