Changeset ba1ea40 in mainline
- Timestamp:
- 2016-12-26T20:03:08Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- db521b05
- Parents:
- 3b3faf51
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/multiboot/multiboot.c
r3b3faf51 rba1ea40 100 100 } 101 101 102 static void multiboot_cmdline(char *cmdline) 103 { 104 /* 105 * GRUB passes the command line in an escaped form. 106 */ 107 for (size_t i = 0, j = 0; 108 cmdline[i] && j < CONFIG_BOOT_ARGUMENTS_BUFLEN; 109 i++, j++) { 110 if (cmdline[i] == '\\') { 111 switch (cmdline[i + 1]) { 112 case '\\': 113 case '\'': 114 case '\"': 115 i++; 116 break; 117 } 118 } 119 bargs[j] = cmdline[i]; 120 } 121 } 122 102 123 static void multiboot_modules(uint32_t count, multiboot_module_t *mods) 103 124 { … … 153 174 if (signature != MULTIBOOT_LOADER_MAGIC) 154 175 return; 155 176 177 /* Copy command line. */ 178 if ((info->flags & MULTIBOOT_INFO_FLAGS_CMDLINE) != 0) 179 multiboot_cmdline((char *) MULTIBOOT_PTR(info->cmd_line)); 180 156 181 /* Copy modules information. */ 157 182 if ((info->flags & MULTIBOOT_INFO_FLAGS_MODS) != 0)
Note:
See TracChangeset
for help on using the changeset viewer.