Ignore:
Timestamp:
2017-07-21T20:00:53Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
65c28f7
Parents:
9ef1fade
Message:

Deduplicate multiboot cmdline parsing code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/multiboot/multiboot2.c

    r9ef1fade r3009164  
    4444static void multiboot2_cmdline(const multiboot2_cmdline_t *module)
    4545{
    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);
    6347}
    6448
Note: See TracChangeset for help on using the changeset viewer.