Changeset 3009164 in mainline
- Timestamp:
- 2017-07-21T20:00:53Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 65c28f7
- Parents:
- 9ef1fade
- Location:
- kernel/genarch
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/Makefile.inc
r9ef1fade r3009164 169 169 ifeq ($(CONFIG_MULTIBOOT), y) 170 170 GENARCH_SOURCES += \ 171 genarch/src/multiboot/common.c \ 171 172 genarch/src/multiboot/multiboot.c \ 172 173 genarch/src/multiboot/multiboot2.c -
kernel/genarch/include/genarch/multiboot/multiboot.h
r9ef1fade r3009164 71 71 } __attribute__((packed)) multiboot_module_t; 72 72 73 extern void multiboot_cmdline(const char *); 74 73 75 extern void multiboot_extract_command(char *, size_t, const char *); 74 76 extern void multiboot_extract_argument(char *, size_t, const char *); -
kernel/genarch/src/multiboot/multiboot.c
r9ef1fade r3009164 101 101 } 102 102 103 static void multiboot_cmdline(char *cmdline)104 {105 /*106 * GRUB passes the command line in an escaped form.107 */108 for (size_t i = 0, j = 0;109 cmdline[i] && j < CONFIG_BOOT_ARGUMENTS_BUFLEN;110 i++, j++) {111 if (cmdline[i] == '\\') {112 switch (cmdline[i + 1]) {113 case '\\':114 case '\'':115 case '\"':116 i++;117 break;118 }119 }120 bargs[j] = cmdline[i];121 }122 }123 124 103 static void multiboot_modules(uint32_t count, multiboot_module_t *mods) 125 104 { -
kernel/genarch/src/multiboot/multiboot2.c
r9ef1fade r3009164 44 44 static void multiboot2_cmdline(const multiboot2_cmdline_t *module) 45 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 } 46 multiboot_cmdline(module->string); 63 47 } 64 48
Note:
See TracChangeset
for help on using the changeset viewer.