80 cols & cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39304 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2010-11-04 19:37:30 +00:00
parent f649b1fa77
commit 2ef563d813

View File

@ -21,12 +21,17 @@ dump_multiboot_info(void)
return;
dprintf("Found MultiBoot Info at %p\n", gMultiBootInfo);
dprintf(" flags: 0x%lx\n", gMultiBootInfo->flags);
if (gMultiBootInfo->flags & MULTIBOOT_INFO_BOOTDEV)
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);
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)
{
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;
const char *cmdline = (const char *)gMultiBootInfo->cmdline;
// skip kernel (bootloader) name
cmdline = strchr(cmdline, ' ');
if (!cmdline)
@ -45,7 +53,9 @@ parse_multiboot_commandline(stage2_args *args)
cmdline++;
if (*cmdline == '\0')
return B_ENTRY_NOT_FOUND;
sArgs[0] = cmdline;
args->arguments = sArgs;
return B_OK;
}