Chameleon

Chameleon Svn Source Tree

Root/branches/rewrite/i386/modules/BiosDisk/BiosDisk.cpp

Source at commit 1075 created 3 years 2 months ago.
By meklort, Disk code
1/*
2 * Copyright (c) 2011 Evan Lojewski. All rights reserved.
3 *
4 */
5#include <BiosDisk.hpp>
6
7
8BiosDisk::BiosDisk(const char* name)
9{
10 busType = "bios";
11
12 // fixme
13 if(name[0] != 'b' &&
14 name[1] != 'i' &&
15 name[2] != 'o' &&
16 name[3] != 's' &&
17 name[4] != ':') name = NULL;
18
19 mName = name;
20
21 // TODO: convert mName to bios disk id
22}
23
24BiosDisk::~BiosDisk()
25{
26
27}
28
29IOReturn BiosDisk::Read(UInt64 sector, UInt64 size, char* buffer)
30{
31 if(!isValid()) return kIOReturnNoDevice;
32 return kIOReturnSuccess;
33}
34
35
36IOReturn BiosDisk::Write(UInt64 sector, UInt64 size, char* buffer)
37{
38 if(!isValid()) return kIOReturnNoDevice;
39 return kIOReturnNotWritable;
40}
41

Archive Download this file

Revision: 1075