diff options
Diffstat (limited to 'sys/fs/initramfs.c')
-rw-r--r-- | sys/fs/initramfs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/fs/initramfs.c b/sys/fs/initramfs.c index c41deb4..beb2e84 100644 --- a/sys/fs/initramfs.c +++ b/sys/fs/initramfs.c @@ -61,12 +61,16 @@ struct initramfs_node { * @magic: Header magic ("OMAR") * @len: Length of the file * @namelen: Length of the filename + * @rev: OMAR revision + * @mode: File permissions */ struct __packed omar_hdr { char magic[4]; uint8_t type; uint8_t namelen; uint32_t len; + uint8_t rev; + uint32_t mode; }; static volatile struct limine_module_request mod_req = { @@ -140,7 +144,7 @@ initramfs_get_file(const char *path, struct initramfs_node *res) p += hdr->namelen; if (strcmp(namebuf, path) == 0) { - node.mode = 0700; + node.mode = hdr->mode; node.size = hdr->len; node.data = (void *)p; *res = node; |