:: commit 6caaada6367427e8b1233f17163bf869a5a039d3

mintsuki <mintsuki@protonmail.com> — 2022-03-31 07:03

parents: a75d3348fb

limine: Rename 2 limine_file members

diff --git a/PROTOCOL.md b/PROTOCOL.md
index 25149f92..96d41cec 100644
--- a/PROTOCOL.md
+++ b/PROTOCOL.md
@@ -632,8 +632,8 @@ struct limine_uuid {
 
 struct limine_file {
     uint64_t revision;
-    void *base;
-    uint64_t length;
+    void *address;
+    uint64_t size;
     char *path;
     char *cmdline;
     uint64_t partition_index;
@@ -648,8 +648,8 @@ struct limine_file {
 ```
 
 * `revision` - Revision of the `struct limine_file` structure.
-* `base` - The address of the file.
-* `length` - The size of the file.
+* `address` - The address of the file.
+* `size` - The size of the file.
 * `path` - The path of the file within the volume, with a leading slash.
 * `cmdline` - A command line associated with the file.
 * `partition_index` - 1-based partition index of the volume from which the
diff --git a/common/protos/limine.c b/common/protos/limine.c
index bb754f43..514a53b8 100644
--- a/common/protos/limine.c
+++ b/common/protos/limine.c
@@ -74,8 +74,8 @@ static struct limine_file get_file(struct file_handle *file, char *cmdline) {
     strcpy(path, file->path);
     ret.path = reported_addr(path);
 
-    ret.base = reported_addr(freadall(file, MEMMAP_KERNEL_AND_MODULES));
-    ret.length = file->size;
+    ret.address = reported_addr(freadall(file, MEMMAP_KERNEL_AND_MODULES));
+    ret.size = file->size;
 
     ret.cmdline = reported_addr(cmdline);
 
diff --git a/limine.h b/limine.h
index 311bb61c..fd5bff72 100644
--- a/limine.h
+++ b/limine.h
@@ -26,8 +26,8 @@ struct limine_uuid {
 
 struct limine_file {
     uint64_t revision;
-    LIMINE_PTR(void *) base;
-    uint64_t length;
+    LIMINE_PTR(void *) address;
+    uint64_t size;
     LIMINE_PTR(char *) path;
     LIMINE_PTR(char *) cmdline;
     uint64_t partition_index;
diff --git a/test/limine.c b/test/limine.c
index 99a6a6f2..dc316e9c 100644
--- a/test/limine.c
+++ b/test/limine.c
@@ -102,8 +102,8 @@ static char *get_memmap_type(uint64_t type) {
 
 static void print_file(struct limine_file *file) {
     e9_printf("File->Revision: %d", file->revision);
-    e9_printf("File->Base: %x", file->base);
-    e9_printf("File->Length: %x", file->length);
+    e9_printf("File->Address: %x", file->address);
+    e9_printf("File->Size: %x", file->size);
     e9_printf("File->Path: %s", file->path);
     e9_printf("File->CmdLine: %s", file->cmdline);
     e9_printf("File->PartIndex: %d", file->partition_index);
tab: 248 wrap: offon