mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Add a mode field to the dirent structure.
This commit is contained in:
@@ -21,6 +21,7 @@ public:
|
||||
locked = bytes0[7] & 0x80;
|
||||
length = ((bytes1[6] & 0x30) << 12) | (bytes1[5] << 8) | bytes1[4];
|
||||
file_type = TYPE_FILE;
|
||||
mode = locked ? "L" : "";
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -66,6 +67,7 @@ public:
|
||||
attributes["filename"] = dirent->filename;
|
||||
attributes["length"] = fmt::format("{}", dirent->length);
|
||||
attributes["type"] = "file";
|
||||
attributes["mode"] = dirent->mode;
|
||||
attributes["acorndfs.inode"] = fmt::format("{}", dirent->inode);
|
||||
attributes["acorndfs.start_sector"] = fmt::format("{}", dirent->start_sector);
|
||||
attributes["acorndfs.load_address"] = fmt::format("0x{:x}", dirent->load_address);
|
||||
|
||||
@@ -32,6 +32,7 @@ public:
|
||||
start_sector = br.read_be16();
|
||||
length = br.read_8() * SECTOR_SIZE;
|
||||
file_type = TYPE_FILE;
|
||||
mode = "";
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -75,6 +76,7 @@ public:
|
||||
attributes["filename"] = dirent->filename;
|
||||
attributes["length"] = fmt::format("{}", dirent->length);
|
||||
attributes["type"] = "file";
|
||||
attributes["mode"] = dirent->mode;
|
||||
attributes["brother120.inode"] = fmt::format("{}", dirent->inode);
|
||||
attributes["brother120.start_sector"] = fmt::format("{}", dirent->start_sector);
|
||||
attributes["brother120.type"] = fmt::format("{}", dirent->brother_type);
|
||||
|
||||
@@ -21,6 +21,7 @@ struct Dirent
|
||||
std::string filename;
|
||||
FileType file_type;
|
||||
uint64_t length;
|
||||
std::string mode;
|
||||
};
|
||||
|
||||
enum FilesystemStatus
|
||||
|
||||
Reference in New Issue
Block a user