From 0741fa21ac6cb477891ef15f269c8c8f36cac7c6 Mon Sep 17 00:00:00 2001 From: srs5694 Date: Wed, 9 Jan 2013 12:55:40 -0500 Subject: [PATCH] 0.8.6 release. --- Makefile.mac | 2 +- NEWS | 9 +++++-- README | 40 +++++++++++++++-------------- cgdisk.8 | 6 ++--- current.spec | 8 +++--- diskio-unix.cc | 23 ++++++++++++++++- diskio.h | 4 +++ fixparts.8 | 6 ++--- gdisk.8 | 6 ++--- gpt.cc | 10 ++++---- gptcl.cc | 69 +++++++++++++++++++++++++++----------------------- gptcurses.cc | 4 +++ gptpart.cc | 4 +-- parttypes.cc | 2 +- sgdisk.8 | 6 ++--- support.h | 18 ++++++++----- 16 files changed, 131 insertions(+), 86 deletions(-) diff --git a/Makefile.mac b/Makefile.mac index 4e2cf32..e53e016 100644 --- a/Makefile.mac +++ b/Makefile.mac @@ -18,7 +18,7 @@ gdisk: $(LIB_OBJS) gpttext.o gdisk.o # $(CXX) $(LIB_OBJS) -L/usr/lib -licucore gpttext.o gdisk.o -o gdisk cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o - $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -lncurses -o sgdisk + $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -lncurses -o cgdisk # $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licucore -lncurses -o cgdisk sgdisk: $(LIB_OBJS) gptcl.o sgdisk.o diff --git a/NEWS b/NEWS index 24e867c..a66fdb7 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,10 @@ -0.8.6 (?/??/2012): ------------------- +0.8.6 (1/9/2013): +----------------- + +- Fixed a bug that could cause sgdisk to crash when passing a partition + number of 0 to the -t option. + +- Added support for building under Solaris. - Added a new check to the verification code. diff --git a/README b/README index 55b487d..11d6910 100644 --- a/README +++ b/README @@ -78,7 +78,7 @@ sgdisk include: access up to three GPT partitions on the disk (gdisk and sgdisk only) Of course, GPT fdisk isn't without its limitations. Most notably, it lacks -the filesystem awareness and filesystem-related features of GNU Parted. You +the filesystem awareness and filesystem-related features of GParted. You can't resize a partition's filesystem or create a partition with a filesystem already in place with gdisk, for instance. There's no GUI version of gdisk. @@ -166,10 +166,10 @@ installed, most notably the GNU Compiler Collection (GCC) and its g++ compiler for C++. (Under Windows, Microsoft Visual C++ 2008 can also be used.) In addition, note these requirements: -* On Linux, FreeBSD, and OS X, libuuid must be installed. This is the - standard for Linux and OS X, although you may need to install a package - called uuid-dev or something similar to get the headers. On FreeBSD, the - e2fsprogs-libuuid port must be installed. +* On Linux, FreeBSD, OS X, and Solaris, libuuid must be installed. This is + the standard for Linux and OS X, although you may need to install a + package called uuid-dev or something similar to get the headers. On + FreeBSD, the e2fsprogs-libuuid port must be installed. * The ICU library (http://site.icu-project.org), which provides support for Unicode partition names, is recommended on all @@ -180,7 +180,9 @@ used.) In addition, note these requirements: "-D USE_UTF16" part from the CXXFLAGS line and remove references to -licuio, -licuuc, -licudata, and -licucore (details vary between platforms) from the compilation options. Suitable lines are present, but - commented out, in the Makefile, Makefile.mac, and Makefile.bsd files. + commented out, in the Makefile, Makefile.solaris, Makefile.freebsd files. + Because of problems with ICU under OS X, the Makefile.mac file doesn't + build against ICU by default. * The cgdisk program requires the ncurses library and its development files (headers). Most Linux distributions install ncurses by default, but you @@ -205,16 +207,16 @@ used.) In addition, note these requirements: When all the necessary development tools and libraries are installed, you can uncompress the package and type "make" at the command prompt in the resulting directory. (You may need to type "make -f Makefile.mac" on Mac OS -X, "make -f Makefile.freebsd" on FreeBSD, or "make -f Makefile.mingw" to -compile using MinGW for Windows.) You may also need to add header (include) -directories or library directories by setting the CXXFLAGS environment -variable or by editing the Makefile. The result should be program files -called gdisk, sgdisk, and fixparts. Typing "make gdisk", "make cgdisk", -"make sgdisk", or "make fixparts" will compile only the requested programs. -You can use these programs in place or copy the files to a suitable -directory, such as /usr/local/sbin. You can copy the man pages (gdisk.8, -cgdisk.8, sgdisk.8, and fixparts.8) to /usr/local/man/man8 to make them -available. +X, "make -f Makefile.freebsd" on FreeBSD, "make -f Makefile.solaris" on +Solaris, or "make -f Makefile.mingw" to compile using MinGW for Windows.) +You may also need to add header (include) directories or library +directories by setting the CXXFLAGS environment variable or by editing the +Makefile. The result should be program files called gdisk, cgdisk, sgdisk, +and fixparts. Typing "make gdisk", "make cgdisk", "make sgdisk", or "make +fixparts" will compile only the requested programs. You can use these +programs in place or copy the files to a suitable directory, such as +/usr/local/sbin. You can copy the man pages (gdisk.8, cgdisk.8, sgdisk.8, +and fixparts.8) to /usr/local/man/man8 to make them available. Caveats ------- @@ -230,9 +232,9 @@ virtual QEMU and VirtualBox disks. I've received user reports of success with RAID arrays over 2TiB in size, though. My main development platform is a system running the 64-bit version of -Gentoo Linux (previously Ubuntu 8.04). I've also tested on several other -32- and 64-bit Linux distributions, Intel-based Mac OS X 10.5 and 10.6, -64-bit FreeBSD 7.1, and Windows 7. +Gentoo Linux. I've also tested on several other 32- and 64-bit Linux +distributions, Intel-based Mac OS X 10.5 and 10.6, 64-bit FreeBSD 7.1, and +Windows 7. Redistribution -------------- diff --git a/cgdisk.8 b/cgdisk.8 index afcf063..66655d3 100644 --- a/cgdisk.8 +++ b/cgdisk.8 @@ -1,6 +1,6 @@ -.\" Copyright 2011, 2012 Roderick W. Smith (rodsmith@rodsbooks.com) +.\" Copyright 2011-2013 Roderick W. Smith (rodsmith@rodsbooks.com) .\" May be distributed under the GNU General Public License -.TH "CGDISK" "8" "0.8.5" "Roderick W. Smith" "GPT fdisk Manual" +.TH "CGDISK" "8" "0.8.6" "Roderick W. Smith" "GPT fdisk Manual" .SH "NAME" cgdisk \- Curses-based GUID partition table (GPT) manipulator .SH "SYNOPSIS" @@ -268,7 +268,7 @@ Write data. Use this command to save your changes. .SH "BUGS" -As of May 2012 (version 0.8.5), \fBcgdisk\fR should be considered +As of January 2013 (version 0.8.6), \fBcgdisk\fR should be considered beta software. Although the underlying partition manipulation code is much older, the \fBcgdisk\fR ncurses user interface is brand new with GPT fdisk version 0.8.0. Known bugs and limitations include: diff --git a/current.spec b/current.spec index 9a86751..13308e4 100644 --- a/current.spec +++ b/current.spec @@ -1,11 +1,11 @@ Summary: GPT partitioning and MBR repair software Name: gptfdisk -Version: 0.8.5 +Version: 0.8.6 Release: 1%{?dist} License: GPLv2 URL: http://www.rodsbooks.com/gdisk Group: Applications/System -Source: http://www.rodsbooks.com/gdisk/gptfdisk-0.8.5.tar.gz +Source: http://www.rodsbooks.com/gdisk/gptfdisk-0.8.6.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %description @@ -80,5 +80,5 @@ provides a few additional partition manipulation features. %changelog -* Wed May 30 2012 R Smith - 0.8.5 -- Created spec file for 0.8.5 release +* Wed Jan 9 2013 R Smith - 0.8.6 +- Created spec file for 0.8.6 release diff --git a/diskio-unix.cc b/diskio-unix.cc index 0bfceef..fcd10e5 100644 --- a/diskio-unix.cc +++ b/diskio-unix.cc @@ -132,6 +132,9 @@ void DiskIO::Close(void) { // (512). If the disk can't be opened at all, return a value of 0. int DiskIO::GetBlockSize(void) { int err = -1, blockSize = 0; +#ifdef __sun__ + struct dk_minfo minfo; +#endif // If disk isn't open, try to open it.... if (!isOpen) { @@ -142,6 +145,11 @@ int DiskIO::GetBlockSize(void) { #ifdef __APPLE__ err = ioctl(fd, DKIOCGETBLOCKSIZE, &blockSize); #endif +#ifdef __sun__ + err = ioctl(fd, DKIOCGMEDIAINFO, &minfo); + if (err == 0) + blockSize = minfo.dki_lbsize; +#endif #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) err = ioctl(fd, DIOCGSECTORSIZE, &blockSize); #endif @@ -217,13 +225,17 @@ int DiskIO::DiskSync(void) { if (isOpen) { sync(); -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__sun__) cout << "Warning: The kernel may continue to use old or deleted partitions.\n" << "You should reboot or remove the drive.\n"; /* don't know if this helps * it definitely will get things on disk though: * http://topiks.org/mac-os-x/0321278542/ch12lev1sec8.html */ +#ifdef __sun__ + i = ioctl(fd, DKIOCFLUSHWRITECACHE); +#else i = ioctl(fd, DKIOCSYNCHRONIZECACHE); +#endif platformFound++; #endif #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) @@ -377,6 +389,9 @@ uint64_t DiskIO::DiskSize(int *err) { off_t bytes = 0; // size in bytes struct stat64 st; int platformFound = 0; +#ifdef __sun__ + struct dk_minfo minfo; +#endif // If disk isn't open, try to open it.... if (!isOpen) { @@ -393,6 +408,12 @@ uint64_t DiskIO::DiskSize(int *err) { *err = ioctl(fd, DKIOCGETBLOCKCOUNT, §ors); platformFound++; #endif +#ifdef __sun__ + *err = ioctl(fd, DKIOCGMEDIAINFO, &minfo); + if (*err == 0) + sectors = minfo.dki_capacity; + platformFound++; +#endif #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) *err = ioctl(fd, DIOCGMEDIASIZE, &bytes); long long b = GetBlockSize(); diff --git a/diskio.h b/diskio.h index 5947e7d..631a43a 100644 --- a/diskio.h +++ b/diskio.h @@ -25,6 +25,10 @@ #include #endif +#ifdef __sun__ +#include +#endif + #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) #define fstat64 fstat #define stat64 stat diff --git a/fixparts.8 b/fixparts.8 index a36f1a1..259fab2 100644 --- a/fixparts.8 +++ b/fixparts.8 @@ -1,6 +1,6 @@ -.\" Copyright 2011, 2012 Roderick W. Smith (rodsmith@rodsbooks.com) +.\" Copyright 2011-2013 Roderick W. Smith (rodsmith@rodsbooks.com) .\" May be distributed under the GNU General Public License -.TH "FIXPARTS" "8" "0.8.5" "Roderick W. Smith" "FixParts Manual" +.TH "FIXPARTS" "8" "0.8.6" "Roderick W. Smith" "FixParts Manual" .SH "NAME" fixparts \- MBR partition table repair utility .SH "SYNOPSIS" @@ -202,7 +202,7 @@ see a summary of available options. .PP .SH "BUGS" -As of May 2012 (version 0.8.5), \fBfixparts\fR +As of January 2013 (version 0.8.6), \fBfixparts\fR should be considered beta software. Known bugs and limitations include: .TP diff --git a/gdisk.8 b/gdisk.8 index 4cc191b..e574dc9 100644 --- a/gdisk.8 +++ b/gdisk.8 @@ -1,6 +1,6 @@ -.\" Copyright 2011, 2012 Roderick W. Smith (rodsmith@rodsbooks.com) +.\" Copyright 2011-2013 Roderick W. Smith (rodsmith@rodsbooks.com) .\" May be distributed under the GNU General Public License -.TH "GDISK" "8" "0.8.5" "Roderick W. Smith" "GPT fdisk Manual" +.TH "GDISK" "8" "0.8.6" "Roderick W. Smith" "GPT fdisk Manual" .SH "NAME" gdisk \- Interactive GUID partition table (GPT) manipulator .SH "SYNOPSIS" @@ -561,7 +561,7 @@ entering data. When only one option is possible, \fBgdisk\fR usually bypasses the prompt entirely. .SH "BUGS" -As of May 2012 (version 0.8.5), \fBgdisk\fR +As of January 2013 (version 0.8.6), \fBgdisk\fR should be considered beta software. Known bugs and limitations include: .TP diff --git a/gpt.cc b/gpt.cc index e0f5899..40dd55e 100644 --- a/gpt.cc +++ b/gpt.cc @@ -261,10 +261,10 @@ int GPTData::Verify(void) { if ((mainHeader.lastUsableLBA >= diskSize) || (mainHeader.lastUsableLBA > mainHeader.backupLBA)) { problems++; - cout << "\nProblem: GPT claims the disk is larger than it is!\n"; - cout << "(Claimed last usable sector is " << mainHeader.lastUsableLBA << ", but\n"; - cout << "backup header is at " << mainHeader.backupLBA << " and disk size is\n"; - cout << diskSize << "sectors\n"; + cout << "\nProblem: GPT claims the disk is larger than it is! (Claimed last usable\n" + << "sector is " << mainHeader.lastUsableLBA << ", but backup header is at\n" + << mainHeader.backupLBA << " and disk size is " << diskSize << " sectors.\n" + << "The 'e' option on the experts' menu will probably fix this problem\n"; } // Check for overlapping partitions.... @@ -1741,7 +1741,7 @@ uint32_t GPTData::CreatePartition(uint32_t partNum, uint64_t startSector, uint64 if (FindLastInFree(startSector) >= endSector) { partitions[partNum].SetFirstLBA(startSector); partitions[partNum].SetLastLBA(endSector); - partitions[partNum].SetType(DEFAULT_TYPE); + partitions[partNum].SetType(DEFAULT_GPT_TYPE); partitions[partNum].RandomizeUniqueGUID(); } else retval = 0; // if free space until endSector } else retval = 0; // if startSector is free diff --git a/gptcl.cc b/gptcl.cc index 48f18a4..31d05b5 100644 --- a/gptcl.cc +++ b/gptcl.cc @@ -49,7 +49,7 @@ void GPTDataCL::LoadBackupFile(string backupFile, int &saveData, int &neverSaveD neverSaveData = 1; cerr << "Error loading backup file!\n"; } // else -} // +} // GPTDataCL::LoadBackupFile() // Perform the actions specified on the command line. This is necessarily one // monster of a function! @@ -64,7 +64,6 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { GPTData secondDevice; int opt, numOptions = 0, saveData = 0, neverSaveData = 0; int partNum = 0, saveNonGPT = 1, retval = 0, pretend = 0; - uint32_t gptPartNum = 0; uint64_t low, high, startSector, endSector, sSize; uint64_t temp; // temporary variable; free to use in any case char *device; @@ -113,14 +112,14 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { // Create popt context... poptCon = poptGetContext(NULL, argc, (const char**) argv, theOptions, 0); - + poptSetOtherOptionHelp(poptCon, " [OPTION...] "); - + if (argc < 2) { poptPrintUsage(poptCon, stderr, 0); return 1; } - + // Do one loop through the options to find the device filename and deal // with options that don't require a device filename, to flag destructive // (o, z, or Z) options, and to flag presence of an @@ -145,11 +144,11 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { } // switch numOptions++; } // while - + // Assume first non-option argument is the device filename.... device = (char*) poptGetArg(poptCon); poptResetContext(poptCon); - + if (device != NULL) { JustLooking(); // reset as necessary BeQuiet(); // Tell called functions to be less verbose & interactive @@ -194,15 +193,17 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { case 'c': JustLooking(0); partNum = (int) GetInt(partName, 1) - 1; - name = GetString(partName, 2); - if (SetName(partNum, (UnicodeString) name.c_str())) { - saveData = 1; - } else { - cerr << "Unable to set partition " << partNum + 1 - << "'s name to '" << GetString(partName, 2) << "'!\n"; - neverSaveData = 1; - } // if/else - free(partName); + if ((partNum >= 0) && (partNum < (int) GetNumParts())) { + name = GetString(partName, 2); + if (SetName(partNum, (UnicodeString) name.c_str())) { + saveData = 1; + } else { + cerr << "Unable to set partition " << partNum + 1 + << "'s name to '" << GetString(partName, 2) << "'!\n"; + neverSaveData = 1; + } // if/else + free(partName); + } break; case 'C': JustLooking(0); @@ -348,16 +349,18 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { case 't': JustLooking(0); partNum = (int) GetInt(typeCode, 1) - 1; - typeHelper = GetString(typeCode, 2); - if ((typeHelper != (GUIDData) "00000000-0000-0000-0000-000000000000") && - (ChangePartType(partNum, typeHelper))) { - saveData = 1; - } else { - cerr << "Could not change partition " << partNum + 1 - << "'s type code to " << GetString(typeCode, 2) << "!\n"; - neverSaveData = 1; - } // if/else + if ((partNum >= 0) && (partNum < (int) GetNumParts())) { + typeHelper = GetString(typeCode, 2); + if ((typeHelper != (GUIDData) "00000000-0000-0000-0000-000000000000") && + (ChangePartType(partNum, typeHelper))) { + saveData = 1; + } else { + cerr << "Could not change partition " << partNum + 1 + << "'s type code to " << GetString(typeCode, 2) << "!\n"; + neverSaveData = 1; + } // if/else free(typeCode); + } break; case 'T': JustLooking(0); @@ -367,8 +370,10 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { case 'u': JustLooking(0); saveData = 1; - gptPartNum = (int) GetInt(partGUID, 1) - 1; - SetPartitionGUID(gptPartNum, GetString(partGUID, 2).c_str()); + partNum = (int) GetInt(partGUID, 1) - 1; + if ((partNum >= 0) && (partNum < (int) GetNumParts())) { + SetPartitionGUID(partNum, GetString(partGUID, 2).c_str()); + } break; case 'U': JustLooking(0); @@ -499,17 +504,17 @@ int GPTDataCL::BuildMBR(char* argument, int isHybrid) { // does). int CountColons(char* argument) { int num = 0; - + while ((argument[0] != '\0') && (argument = strchr(&argument[1], ':'))) num++; - + return num; } // GPTDataCL::CountColons() // Extract integer data from argument string, which should be colon-delimited uint64_t GetInt(const string & argument, int itemNum) { uint64_t retval; - + istringstream inString(GetString(argument, itemNum)); inString >> retval; return retval; @@ -523,7 +528,7 @@ string GetString(string argument, int itemNum) { string retVal = ""; int foundLast = 0; int numFound = 0; - + if (argument[0] == ':') argument.erase(0, 1); while ((numFound < itemNum) && (!foundLast)) { @@ -538,6 +543,6 @@ string GetString(string argument, int itemNum) { } // while if ((numFound == itemNum) && (numFound > 0)) retVal = argument.substr(startPos, endPos - startPos); - + return retVal; } // GetString() diff --git a/gptcurses.cc b/gptcurses.cc index 7fd6e55..8462149 100644 --- a/gptcurses.cc +++ b/gptcurses.cc @@ -219,7 +219,9 @@ void GPTDataCurses::IdentifySpaces(void) { Space* GPTDataCurses::ShowSpace(int spaceNum, int lineNum) { Space *space; int i = 0; +#ifdef USE_UTF16 char temp[40]; +#endif space = firstSpace; while ((space != NULL) && (i < spaceNum)) { @@ -308,7 +310,9 @@ void GPTDataCurses::DeletePartition(int partNum) { // Displays information on the specified partition void GPTDataCurses::ShowInfo(int partNum) { uint64_t size; +#ifdef USE_UTF16 char temp[NAME_SIZE / 2 + 1]; +#endif clear(); move(2, (COLS - 29) / 2); diff --git a/gptpart.cc b/gptpart.cc index 0f5ef02..bbd28ae 100644 --- a/gptpart.cc +++ b/gptpart.cc @@ -277,13 +277,13 @@ void GPTPart::ChangeType(void) { cout << "Current type is '" << GetTypeName() << "'\n"; do { - cout << "Hex code or GUID (L to show codes, Enter = " << hex << DEFAULT_TYPE << dec << "): "; + cout << "Hex code or GUID (L to show codes, Enter = " << hex << DEFAULT_GPT_TYPE << dec << "): "; line = ReadString(); if ((line[0] == 'L') || (line[0] == 'l')) { partitionType.ShowAllTypes(); } else { if (line.length() == 0) - tempType= DEFAULT_TYPE; + tempType = DEFAULT_GPT_TYPE; else tempType = line; } // if/else diff --git a/parttypes.cc b/parttypes.cc index 721e8ff..ae7094d 100644 --- a/parttypes.cc +++ b/parttypes.cc @@ -259,7 +259,7 @@ PartType & PartType::operator=(uint16_t ID) { } // while if (!found) { // Assign a default value.... - operator=(DEFAULT_TYPE); + operator=(DEFAULT_GPT_TYPE); cout.setf(ios::uppercase); cout.fill('0'); cout << "Exact type match not found for type code "; diff --git a/sgdisk.8 b/sgdisk.8 index cd7be37..0790b36 100644 --- a/sgdisk.8 +++ b/sgdisk.8 @@ -1,6 +1,6 @@ -.\" Copyright 2011, 2012 Roderick W. Smith (rodsmith@rodsbooks.com) +.\" Copyright 2011-2013 Roderick W. Smith (rodsmith@rodsbooks.com) .\" May be distributed under the GNU General Public License -.TH "SGDISK" "8" "0.8.5" "Roderick W. Smith" "GPT fdisk Manual" +.TH "SGDISK" "8" "0.8.6" "Roderick W. Smith" "GPT fdisk Manual" .SH "NAME" sgdisk \- Command\-line GUID partition table (GPT) manipulator for Linux and Unix .SH "SYNOPSIS" @@ -490,7 +490,7 @@ sgdisk, but may with gdisk) Disk replication operation (-R) failed .SH "BUGS" -As of May 2012 (version 0.8.5), \fBsgdisk\fR +As of January 2013 (version 0.8.6), \fBsgdisk\fR should be considered beta software. Known bugs and limitations include: .TP diff --git a/support.h b/support.h index 39098dc..571bf76 100644 --- a/support.h +++ b/support.h @@ -8,7 +8,7 @@ #ifndef __GPTSUPPORT #define __GPTSUPPORT -#define GPTFDISK_VERSION "0.8.5.4" +#define GPTFDISK_VERSION "0.8.6" #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) // Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64 @@ -17,15 +17,19 @@ #endif #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) -#define DEFAULT_TYPE 0xA503 +#define DEFAULT_GPT_TYPE 0xA503 #endif #ifdef __APPLE__ -#define DEFAULT_TYPE 0xAF00 +#define DEFAULT_GPT_TYPE 0xAF00 #endif #ifdef _WIN32 -#define DEFAULT_TYPE 0x0700 +#define DEFAULT_GPT_TYPE 0x0700 +#endif + +#ifdef __sun__ +#define DEFAULT_GPT_TYPE 0xbf01 #endif // Microsoft Visual C++ only @@ -38,11 +42,11 @@ // Linux only.... #ifdef __linux__ #include -#define DEFAULT_TYPE 0x8300 +#define DEFAULT_GPT_TYPE 0x8300 #endif -#ifndef DEFAULT_TYPE -#define DEFAULT_TYPE 0x8300 +#ifndef DEFAULT_GPT_TYPE +#define DEFAULT_GPT_TYPE 0x8300 #endif // Set this as a default