IOAppleLabelScheme.h [plain text]
#ifndef _IOAPPLELABELSCHEME_H
#define _IOAPPLELABELSCHEME_H
#include <IOKit/IOTypes.h>
#define kIOAppleLabelSchemeClass "IOAppleLabelScheme"
#pragma pack(push, 1)
struct applelabel
{
uint8_t al_boot0[416];
uint16_t al_magic;
uint16_t al_type;
uint32_t al_flags;
uint64_t al_offset;
uint32_t al_size;
uint32_t al_checksum;
uint8_t al_boot1[72];
};
#define AL_MAGIC 0x414C
#define AL_TYPE_DEFAULT 0x0000
#define AL_FLAG_DEFAULT 0x00000000
#pragma pack(pop)
#ifdef KERNEL
#ifdef __cplusplus
#include <IOKit/storage/IOFilterScheme.h>
class IOAppleLabelScheme : public IOFilterScheme
{
OSDeclareDefaultStructors(IOAppleLabelScheme);
protected:
struct ExpansionData { };
ExpansionData * _expansionData;
IOMedia * _content;
virtual void free(void) APPLE_KEXT_OVERRIDE;
virtual IOMedia * scan(SInt32 * score);
virtual bool isContentCorrupt(OSDictionary * properties);
virtual bool isContentInvalid(OSDictionary * properties);
virtual IOMedia * instantiateMediaObject(OSDictionary * properties);
virtual IOMedia * instantiateDesiredMediaObject(OSDictionary * properties);
virtual bool attachMediaObjectToDeviceTree(IOMedia * media);
virtual void detachMediaObjectFromDeviceTree(IOMedia * media);
public:
virtual bool init(OSDictionary * properties = 0) APPLE_KEXT_OVERRIDE;
virtual IOService * probe(IOService * provider, SInt32 * score) APPLE_KEXT_OVERRIDE;
virtual bool start(IOService * provider) APPLE_KEXT_OVERRIDE;
virtual void stop(IOService * provider) APPLE_KEXT_OVERRIDE;
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 0);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 1);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 2);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 3);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 4);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 5);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 6);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 7);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 8);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 9);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 10);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 11);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 12);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 13);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 14);
OSMetaClassDeclareReservedUnused(IOAppleLabelScheme, 15);
};
#endif
#endif
#endif