Chameleon

Chameleon Commit Details

Date:2011-07-22 05:44:24 (7 years 11 months ago)
Author:Evan Lojewski
Commit:1205
Parents: 1204
Message:Change Partiiton to public when extended by GUIDPartition...
Changes:
M/branches/xZen/i386/modules/Disk/Main.cpp
M/branches/xZen/i386/modules/Disk/include/GUIDPartition.hpp

File differences

branches/xZen/i386/modules/Disk/include/GUIDPartition.hpp
99
1010
1111
12
12
1313
1414
1515
#include <Partition.hpp>
#include <IOKit/storage/IOGUIDPartitionScheme.h>
class GUIDPartition : Partition
class GUIDPartition : public Partition
{
public:
GUIDPartition(Disk* disk, UInt8 partitionNumber);
branches/xZen/i386/modules/Disk/Main.cpp
55
66
77
8
89
910
1011
......
1718
1819
1920
20
21
21
22
23
24
25
26
27
28
29
30
31
32
33
34
2235
23
24
36
37
38
39
2540
2641
2742
#include <IOKit/IOTypes.h>
#include <BiosDisk.hpp>
#include <GUIDPartition.hpp>
extern "C"
{
UInt8* mbr = (UInt8*)malloc(512);
BiosDisk* disk = new BiosDisk("bios:/hd0/");
disk->Read(0, 1, mbr);
printf("mbr[0] = 0x%X\n", mbr[0]);
if(disk->probe())
{
disk->Read(0, 1, mbr);
printf("mbr[0] = 0x%X\n", mbr[0]);
printf("mbr[510] = 0x%X\n", mbr[510]);
printf("mbr[511] = 0x%X\n", mbr[511]);
GUIDPartition* partition = new GUIDPartition(disk, 0);
if(partition->probe())
{
partition->Read(0, 1, mbr);
printf("GUID[0]/[0] = 0x%X\n", mbr[0]);
printf("mbr[510] = 0x%X\n", mbr[510]);
printf("mbr[511] = 0x%X\n", mbr[511]);
}
}
printf("This is a simple BootDisk_start test.\n");
delete disk;

Archive Download the corresponding diff file

Revision: 1205