Chameleon Applications

Chameleon Applications Svn Source Tree

Root/branches/iFabio/Test/i386/util/bdmesg.c

Source at commit 166 created 13 years 7 months ago.
By ifabio, Trunk the "i386/boot2/boot.h" to match with "chameleon trunk 568". Add suggest from scrax (hidden and active option for bdmesg and doc). On test, the icon for the installer...(need feedback I use a dirty method :P). Revised the background (I delete the white background) need more work on the chameleon title.
1/*
2 * BooterLog Dump Tool, part of the Chameleon Boot Loader Project
3 *
4 * Copyright 2010 by Islam M. Ahmed Zaid. All rights reserved.
5 *
6 */
7
8#include <stdio.h>
9#include <stdint.h>
10#include <string.h>
11#include <stdlib.h>
12
13#include "IOKit/IOKitLib.h"
14
15
16int main(int argc, char *argv[])
17{
18io_registry_entry_t root = IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/");
19if (!root)
20{
21printf("IORegistryEntry \"IOIOService:/\" not found.\n");
22return 0;
23}
24
25CFTypeRef bootLog = IORegistryEntryCreateCFProperty(root, CFSTR("boot-log"), kCFAllocatorDefault, 0);
26if (!bootLog)
27{
28printf("\"boot-log\" property not found.\n");
29return 0;
30}
31//CFShow(bootLog);
32const UInt8 *msglog = CFDataGetBytePtr((CFDataRef)bootLog);
33if (msglog)
34printf("%s\n", msglog);
35
36return 0;
37}
38
39

Archive Download this file

Revision: 166