80 cols & cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39304 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f649b1fa77
commit
2ef563d813
@ -21,12 +21,17 @@ dump_multiboot_info(void)
|
|||||||
return;
|
return;
|
||||||
dprintf("Found MultiBoot Info at %p\n", gMultiBootInfo);
|
dprintf("Found MultiBoot Info at %p\n", gMultiBootInfo);
|
||||||
dprintf(" flags: 0x%lx\n", gMultiBootInfo->flags);
|
dprintf(" flags: 0x%lx\n", gMultiBootInfo->flags);
|
||||||
|
|
||||||
if (gMultiBootInfo->flags & MULTIBOOT_INFO_BOOTDEV)
|
if (gMultiBootInfo->flags & MULTIBOOT_INFO_BOOTDEV)
|
||||||
dprintf(" boot_device: 0x%lx\n", gMultiBootInfo->boot_device);
|
dprintf(" boot_device: 0x%lx\n", gMultiBootInfo->boot_device);
|
||||||
if (gMultiBootInfo->flags & MULTIBOOT_INFO_CMDLINE && gMultiBootInfo->cmdline)
|
|
||||||
|
if (gMultiBootInfo->flags & MULTIBOOT_INFO_CMDLINE
|
||||||
|
&& gMultiBootInfo->cmdline)
|
||||||
dprintf(" cmdline: '%s'\n", (char *)gMultiBootInfo->cmdline);
|
dprintf(" cmdline: '%s'\n", (char *)gMultiBootInfo->cmdline);
|
||||||
|
|
||||||
if (gMultiBootInfo->boot_loader_name)
|
if (gMultiBootInfo->boot_loader_name)
|
||||||
dprintf(" boot_loader_name: '%s'\n", (char *)gMultiBootInfo->boot_loader_name);
|
dprintf(" boot_loader_name: '%s'\n",
|
||||||
|
(char *)gMultiBootInfo->boot_loader_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -34,10 +39,13 @@ status_t
|
|||||||
parse_multiboot_commandline(stage2_args *args)
|
parse_multiboot_commandline(stage2_args *args)
|
||||||
{
|
{
|
||||||
static const char *sArgs[] = { NULL, NULL };
|
static const char *sArgs[] = { NULL, NULL };
|
||||||
if (!gMultiBootInfo || !(gMultiBootInfo->flags & MULTIBOOT_INFO_CMDLINE) || !gMultiBootInfo->cmdline)
|
|
||||||
|
if (!gMultiBootInfo || !(gMultiBootInfo->flags & MULTIBOOT_INFO_CMDLINE)
|
||||||
|
|| !gMultiBootInfo->cmdline)
|
||||||
return B_ENTRY_NOT_FOUND;
|
return B_ENTRY_NOT_FOUND;
|
||||||
|
|
||||||
const char *cmdline = (const char *)gMultiBootInfo->cmdline;
|
const char *cmdline = (const char *)gMultiBootInfo->cmdline;
|
||||||
|
|
||||||
// skip kernel (bootloader) name
|
// skip kernel (bootloader) name
|
||||||
cmdline = strchr(cmdline, ' ');
|
cmdline = strchr(cmdline, ' ');
|
||||||
if (!cmdline)
|
if (!cmdline)
|
||||||
@ -45,7 +53,9 @@ parse_multiboot_commandline(stage2_args *args)
|
|||||||
cmdline++;
|
cmdline++;
|
||||||
if (*cmdline == '\0')
|
if (*cmdline == '\0')
|
||||||
return B_ENTRY_NOT_FOUND;
|
return B_ENTRY_NOT_FOUND;
|
||||||
|
|
||||||
sArgs[0] = cmdline;
|
sArgs[0] = cmdline;
|
||||||
args->arguments = sArgs;
|
args->arguments = sArgs;
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user