Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
gptfdisk/mbr.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
43 lines (34 sloc)
1.25 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* mbr.h -- MBR data structure definitions, types, and functions */ | |
/* This program is copyright (c) 2009-2013 by Roderick W. Smith. It is distributed | |
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */ | |
#include <stdint.h> | |
#include <sys/types.h> | |
#include "gptpart.h" | |
//#include "partnotes.h" | |
#include "diskio.h" | |
#include "basicmbr.h" | |
#ifndef __MBRSTRUCTS | |
#define __MBRSTRUCTS | |
using namespace std; | |
/**************************************** | |
* * | |
* MBRData class and related structures * | |
* * | |
****************************************/ | |
// Full data in tweaked MBR format | |
class MBRData : public BasicMBRData { | |
protected: | |
public: | |
MBRData(void) {} | |
MBRData(string deviceFilename) : BasicMBRData(deviceFilename) {} | |
MBRData & operator=(const BasicMBRData & orig); | |
~MBRData(void); | |
// Functions to create, delete, or change partitions | |
// Pass EmptyMBR 1 to clear the boot loader code, 0 to leave it intact | |
void MakeProtectiveMBR(int clearBoot = 0); | |
void OptimizeEESize(void); | |
int DeleteByLocation(uint64_t start64, uint64_t length64); | |
// Functions to extract data on specific partitions.... | |
GPTPart AsGPT(int i); | |
}; // struct MBRData | |
#endif |