Changeset 9ef1fade in mainline for kernel/genarch/src/multiboot/multiboot2.c
- Timestamp:
- 2017-07-21T19:21:59Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3009164
- Parents:
- 9f64c1e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/multiboot/multiboot2.c
r9f64c1e r9ef1fade 41 41 42 42 #define MULTIBOOT2_TAG_ALIGN 8 43 44 static void multiboot2_cmdline(const multiboot2_cmdline_t *module) 45 { 46 /* 47 * GRUB passes the command line in an escaped form. 48 */ 49 for (size_t i = 0, j = 0; 50 module->string[i] && j < CONFIG_BOOT_ARGUMENTS_BUFLEN; 51 i++, j++) { 52 if (module->string[i] == '\\') { 53 switch (module->string[i + 1]) { 54 case '\\': 55 case '\'': 56 case '\"': 57 i++; 58 break; 59 } 60 } 61 bargs[j] = module->string[i]; 62 } 63 } 43 64 44 65 static void multiboot2_module(const multiboot2_module_t *module) … … 117 138 while (tag->type != MULTIBOOT2_TAG_TERMINATOR) { 118 139 switch (tag->type) { 140 case MULTIBOOT2_TAG_CMDLINE: 141 multiboot2_cmdline(&tag->cmdline); 142 break; 119 143 case MULTIBOOT2_TAG_MODULE: 120 144 multiboot2_module(&tag->module);
Note:
See TracChangeset
for help on using the changeset viewer.