boot_loader_openfirmware: Fix style issues
Adjust initializers. Respect 80-column limit and adjust copyright notice. Reorder some header groups. Enforce line spacing. No functional changes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38343 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
/*
|
||||
* Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
* Copyright 2003, Axel Dörfler, [email protected].
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "Handle.h"
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#include <platform/openfirmware/openfirmware.h>
|
||||
#include <util/kernel_cpp.h>
|
||||
|
||||
#include "Handle.h"
|
||||
|
||||
|
||||
Handle::Handle(int handle, bool takeOwnership)
|
||||
:
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <platform_arch.h>
|
||||
#include <boot/addr_range.h>
|
||||
#include <boot/kernel_args.h>
|
||||
@@ -15,8 +17,6 @@
|
||||
#include <arch_mmu.h>
|
||||
#include <kernel.h>
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
|
||||
// set protection to WIMGNPP: -----PP
|
||||
// PP: 00 - no access
|
||||
|
||||
@@ -54,7 +54,8 @@ FILE *stdin, *stdout, *stderr;
|
||||
|
||||
|
||||
ConsoleHandle::ConsoleHandle()
|
||||
: Handle()
|
||||
:
|
||||
Handle()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -117,9 +118,10 @@ ConsoleHandle::WriteAt(void */*cookie*/, off_t /*pos*/, const void *buffer,
|
||||
|
||||
|
||||
InputConsoleHandle::InputConsoleHandle()
|
||||
: ConsoleHandle()
|
||||
, fStart(0)
|
||||
, fCount(0)
|
||||
:
|
||||
ConsoleHandle(),
|
||||
fStart(0),
|
||||
fCount(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/*
|
||||
* Copyright 2003-2006, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
* Copyright 2003-2006, Axel Dörfler, [email protected].
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include "Handle.h"
|
||||
#include "machine.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <boot/platform.h>
|
||||
#include <boot/vfs.h>
|
||||
@@ -16,7 +16,8 @@
|
||||
#include <platform/openfirmware/openfirmware.h>
|
||||
#include <util/kernel_cpp.h>
|
||||
|
||||
#include <string.h>
|
||||
#include "Handle.h"
|
||||
#include "machine.h"
|
||||
|
||||
|
||||
char sBootPath[192];
|
||||
@@ -175,7 +176,8 @@ platform_add_block_devices(stage2_args *args, NodeList *devicesList)
|
||||
}
|
||||
|
||||
Handle *device = new(nothrow) Handle(handle);
|
||||
printf("\t\t(could open device, handle = %p, node = %p)\n", (void *)handle, device);
|
||||
printf("\t\t(could open device, handle = %p, node = %p)\n",
|
||||
(void *)handle, device);
|
||||
|
||||
devicesList->Add(device);
|
||||
}
|
||||
@@ -184,6 +186,7 @@ platform_add_block_devices(stage2_args *args, NodeList *devicesList)
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
platform_register_boot_device(Node *device)
|
||||
{
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
* Copyright 2003, Axel Dörfler, [email protected].
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <boot/platform.h>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
* Copyright 2004, Axel Dörfler, [email protected].
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
* Copyright 2003, Axel Dörfler, [email protected].
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "real_time_clock.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -12,6 +13,7 @@
|
||||
#include <platform/openfirmware/devices.h>
|
||||
#include <platform/openfirmware/openfirmware.h>
|
||||
|
||||
|
||||
status_t
|
||||
init_real_time_clock(void)
|
||||
{
|
||||
|
||||
@@ -4,15 +4,16 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <boot/platform.h>
|
||||
#include <boot/stage2.h>
|
||||
#include <boot/heap.h>
|
||||
#include <platform/openfirmware/openfirmware.h>
|
||||
#include <platform_arch.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "console.h"
|
||||
#include "machine.h"
|
||||
#include "real_time_clock.h"
|
||||
@@ -61,7 +62,8 @@ determine_machine(void)
|
||||
int root = of_finddevice("/");
|
||||
char buffer[64];
|
||||
int length;
|
||||
if ((length = of_getprop(root, "device_type", buffer, sizeof(buffer) - 1)) == OF_FAILED)
|
||||
if ((length = of_getprop(root, "device_type", buffer, sizeof(buffer) - 1))
|
||||
== OF_FAILED)
|
||||
return;
|
||||
buffer[length] = '\0';
|
||||
|
||||
@@ -72,7 +74,8 @@ determine_machine(void)
|
||||
else if (!strcasecmp("bootrom", buffer))
|
||||
gMachine = MACHINE_MAC;
|
||||
|
||||
if ((length = of_getprop(root, "model", buffer, sizeof(buffer) - 1)) == OF_FAILED)
|
||||
if ((length = of_getprop(root, "model", buffer, sizeof(buffer) - 1))
|
||||
== OF_FAILED)
|
||||
return;
|
||||
buffer[length] = '\0';
|
||||
|
||||
@@ -143,7 +146,8 @@ start(void *openFirmwareEntry)
|
||||
of_init((int (*)(void*))openFirmwareEntry);
|
||||
|
||||
// check for arguments
|
||||
if (of_getprop(gChosen, "bootargs", bootargs, sizeof(bootargs)) != OF_FAILED) {
|
||||
if (of_getprop(gChosen, "bootargs", bootargs, sizeof(bootargs))
|
||||
!= OF_FAILED) {
|
||||
static const char *sArgs[] = { NULL, NULL };
|
||||
sArgs[0] = (const char *)bootargs;
|
||||
args.arguments = sArgs;
|
||||
@@ -152,7 +156,7 @@ start(void *openFirmwareEntry)
|
||||
determine_machine();
|
||||
console_init();
|
||||
|
||||
// Initialize and take over MMU and set the OpenFirmware callbacks - it
|
||||
// Initialize and take over MMU and set the OpenFirmware callbacks - it
|
||||
// will ask us for memory after that instead of maintaining it itself
|
||||
// (the kernel will need to adjust the callback later on as well)
|
||||
arch_mmu_init();
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <platform/openfirmware/openfirmware.h>
|
||||
|
||||
|
||||
bigtime_t
|
||||
system_time(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user