Now return useful inode numbers. The BFS inode numbers match the ones from
the real kernel file system (as there is no amiga_ffs add-on yet). The file systems now also return the module name of their kernel counterparts. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7995 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -158,4 +158,11 @@ Directory::GetName(char *name, size_t size) const
|
|||||||
return fNode.GetName(name, size);
|
return fNode.GetName(name, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ino_t
|
||||||
|
Directory::Inode() const
|
||||||
|
{
|
||||||
|
return fNode.HeaderKey();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace FFS
|
} // namespace FFS
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class Directory : public ::Directory {
|
|||||||
virtual bool IsEmpty();
|
virtual bool IsEmpty();
|
||||||
|
|
||||||
virtual status_t GetName(char *name, size_t size) const;
|
virtual status_t GetName(char *name, size_t size) const;
|
||||||
|
virtual ino_t Inode() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Volume &fVolume;
|
Volume &fVolume;
|
||||||
|
|||||||
@@ -247,4 +247,11 @@ File::Size() const
|
|||||||
return fNode.Size();
|
return fNode.Size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ino_t
|
||||||
|
File::Inode() const
|
||||||
|
{
|
||||||
|
return fNode.HeaderKey();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace FFS
|
} // namespace FFS
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ class File : public Node {
|
|||||||
virtual status_t GetName(char *nameBuffer, size_t bufferSize) const;
|
virtual status_t GetName(char *nameBuffer, size_t bufferSize) const;
|
||||||
virtual int32 Type() const;
|
virtual int32 Type() const;
|
||||||
virtual off_t Size() const;
|
virtual off_t Size() const;
|
||||||
|
virtual ino_t Inode() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Volume &fVolume;
|
Volume &fVolume;
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ amiga_ffs_get_file_system(boot::Partition *partition, ::Directory **_root)
|
|||||||
|
|
||||||
|
|
||||||
file_system_module_info gAmigaFFSFileSystemModule = {
|
file_system_module_info gAmigaFFSFileSystemModule = {
|
||||||
|
"file_systems/amiga_ffs/v1",
|
||||||
kPartitionTypeAmigaFFS,
|
kPartitionTypeAmigaFFS,
|
||||||
amiga_ffs_get_file_system
|
amiga_ffs_get_file_system
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -190,4 +190,11 @@ Directory::GetName(char *name, size_t size) const
|
|||||||
return fStream.GetName(name, size);
|
return fStream.GetName(name, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ino_t
|
||||||
|
Directory::Inode() const
|
||||||
|
{
|
||||||
|
return fStream.ID();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace BFS
|
} // namespace BFS
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class Directory : public ::Directory {
|
|||||||
virtual bool IsEmpty();
|
virtual bool IsEmpty();
|
||||||
|
|
||||||
virtual status_t GetName(char *name, size_t size) const;
|
virtual status_t GetName(char *name, size_t size) const;
|
||||||
|
virtual ino_t Inode() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Stream fStream;
|
Stream fStream;
|
||||||
|
|||||||
@@ -82,4 +82,11 @@ File::Size() const
|
|||||||
return fStream.Size();
|
return fStream.Size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ino_t
|
||||||
|
File::Inode() const
|
||||||
|
{
|
||||||
|
return fStream.ID();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace BFS
|
} // namespace BFS
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ class File : public Node {
|
|||||||
virtual status_t GetName(char *nameBuffer, size_t bufferSize) const;
|
virtual status_t GetName(char *nameBuffer, size_t bufferSize) const;
|
||||||
virtual int32 Type() const;
|
virtual int32 Type() const;
|
||||||
virtual off_t Size() const;
|
virtual off_t Size() const;
|
||||||
|
virtual ino_t Inode() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Stream fStream;
|
Stream fStream;
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ bfs_get_file_system(boot::Partition *partition, ::Directory **_root)
|
|||||||
|
|
||||||
|
|
||||||
file_system_module_info gBFSFileSystemModule = {
|
file_system_module_info gBFSFileSystemModule = {
|
||||||
|
"file_systems/bfs/v1",
|
||||||
kPartitionTypeBFS,
|
kPartitionTypeBFS,
|
||||||
bfs_get_file_system
|
bfs_get_file_system
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user