Work in progress to pass the image extents to the kernel,

- code is disabled yet as the bootloader doesn't have add_boot_item.. will need to pass via kernel args
- add a GetFileMap() method to the vfs, and implement it in FAT code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28445 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol
2008-11-01 20:39:14 +00:00
parent ebb7d4466e
commit 9da2356857
9 changed files with 103 additions and 17 deletions
+13 -2
View File
@@ -22,6 +22,14 @@ struct file_map_run {
off_t len;
};
struct file_map_boot_item {
int32 block_size;
int32 num_runs;
struct file_map_run runs[FMAP_MAX_RUNS];
};
#ifdef _BOOT_MODE
class FileMap {
public:
FileMap();
@@ -49,12 +57,13 @@ class FileMapDisk : public Node {
size_t bufferSize);
virtual status_t GetName(char *nameBuffer, size_t bufferSize) const;
virtual status_t GetFileMap(struct file_map_run *runs, int32 *count);
virtual off_t Size() const;
status_t GetFileMap(FileMap **map);
static FileMapDisk *FindAnyFileMapDisk(Directory *volume);
status_t RegisterFileMapBootItem();
private:
Node *fNode;
/*
@@ -65,4 +74,6 @@ class FileMapDisk : public Node {
};
#endif // _BOOT_MODE
#endif // _BOOT_FILE_MAP_DISK_H
+3
View File
@@ -14,6 +14,8 @@
#ifdef __cplusplus
struct file_map_run;
/** This is the base class for all VFS nodes */
class Node : public DoublyLinkedListLinkImpl<Node> {
@@ -28,6 +30,7 @@ class Node : public DoublyLinkedListLinkImpl<Node> {
virtual ssize_t WriteAt(void *cookie, off_t pos, const void *buffer, size_t bufferSize) = 0;
virtual status_t GetName(char *nameBuffer, size_t bufferSize) const;
virtual status_t GetFileMap(struct file_map_run *runs, int32 *count);
virtual int32 Type() const;
virtual off_t Size() const;
virtual ino_t Inode() const;