diffstat for gdisk-0.8.5 gdisk-0.8.6 Makefile.mac | 16 ++++----- NEWS | 25 +++++++++++++++ README | 40 +++++++++++++----------- cgdisk.8 | 6 +-- cgdisk.html | 6 +-- current.spec | 8 ++-- debian/changelog | 12 +++++++ debian/control | 3 + debian/patches/manpages.diff | 34 --------------------- debian/patches/series | 1 diskio-unix.cc | 23 +++++++++++++- diskio.h | 4 ++ fixparts.8 | 34 ++++++++++----------- fixparts.html | 34 ++++++++++----------- gdisk.8 | 6 +-- gdisk.html | 6 +-- gpt.cc | 33 +++++++++++++++++--- gpt.h | 2 - gptcl.cc | 69 +++++++++++++++++++++++-------------------- gptcurses.cc | 4 ++ gptpart.cc | 7 ++-- gpttext.cc | 2 - parttypes.cc | 19 ++++++++--- sgdisk.8 | 6 +-- sgdisk.html | 6 +-- support.h | 18 ++++++----- 26 files changed, 250 insertions(+), 174 deletions(-) diff -Nru gdisk-0.8.5/Makefile.mac gdisk-0.8.6/Makefile.mac --- gdisk-0.8.5/Makefile.mac 2012-05-30 15:38:43.000000000 +0000 +++ gdisk-0.8.6/Makefile.mac 2013-01-09 16:09:33.000000000 +0000 @@ -1,8 +1,8 @@ CC=gcc CXX=g++ CFLAGS=-O2 -D_FILE_OFFSET_BITS=64 -g -CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -I/sw/include -I/usr/local/include -I/opt/local/include -g -#CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -I /usr/local/include -I/opt/local/include -g +#CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -I/sw/include -I/usr/local/include -I/opt/local/include -g +CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -I/sw/include -I /usr/local/include -I/opt/local/include -g LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix MBR_LIBS=support diskio diskio-unix basicmbr mbrpart #LIB_SRCS=$(NAMES:=.cc) @@ -14,16 +14,16 @@ all: gdisk sgdisk cgdisk fixparts gdisk: $(LIB_OBJS) gpttext.o gdisk.o -# $(CXX) $(LIB_OBJS) gpttext.o gdisk.o -o gdisk - $(CXX) $(LIB_OBJS) -L/usr/lib -licucore gpttext.o gdisk.o -o gdisk + $(CXX) $(LIB_OBJS) gpttext.o gdisk.o -o gdisk +# $(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) -licucore -lncurses -o cgdisk + $(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 -# $(CXX) $(LIB_OBJS) gptcl.o sgdisk.o -L/sw/lib -lpopt -o sgdisk - $(CXX) $(LIB_OBJS) gptcl.o sgdisk.o -L/sw/lib -licucore -lpopt -o sgdisk + $(CXX) $(LIB_OBJS) gptcl.o sgdisk.o -L/sw/lib -lpopt -o sgdisk +# $(CXX) $(LIB_OBJS) gptcl.o sgdisk.o -L/sw/lib -licucore -lpopt -o sgdisk fixparts: $(MBR_LIB_OBJS) fixparts.o $(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts diff -Nru gdisk-0.8.5/NEWS gdisk-0.8.6/NEWS --- gdisk-0.8.5/NEWS 2012-05-30 15:38:43.000000000 +0000 +++ gdisk-0.8.6/NEWS 2013-01-09 16:09:33.000000000 +0000 @@ -1,3 +1,28 @@ +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. + +- Added partition type code for Sony system partition + (F4019732-066E-4E12-8273-346C5641494F). I'm not entirely clear what this + is used for, but it's appearing on some new Sony computers. + +- Tweaked hybrid MBR creation options to fix a problem that caused the main + 0xEE MBR partition to NOT be created if the user told gdisk to NOT place + it at the start of the disk AND IF fewer than three partitions are + hybridize AND IF the user opted to create a second protective partition. + +- Changed default build options for Mac OS X to *NOT* use libicu, + since it seems to have broken somewhere along the line. It still + works on Linux, though. + +- Added partition type codes for VMWare ESX (FB00, FB01, and FC00). + 0.8.5 (5/30/2012): ------------------ diff -Nru gdisk-0.8.5/README gdisk-0.8.6/README --- gdisk-0.8.5/README 2012-05-30 15:38:43.000000000 +0000 +++ gdisk-0.8.6/README 2013-01-09 16:09:33.000000000 +0000 @@ -78,7 +78,7 @@ 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 @@ 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 @@ "-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 @@ 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 @@ 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 -Nru gdisk-0.8.5/cgdisk.8 gdisk-0.8.6/cgdisk.8 --- gdisk-0.8.5/cgdisk.8 2012-05-30 15:38:43.000000000 +0000 +++ gdisk-0.8.6/cgdisk.8 2013-01-09 16:09:33.000000000 +0000 @@ -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 @@ .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 -Nru gdisk-0.8.5/cgdisk.html gdisk-0.8.6/cgdisk.html --- gdisk-0.8.5/cgdisk.html 2012-05-30 15:38:43.000000000 +0000 +++ gdisk-0.8.6/cgdisk.html 2013-01-09 16:09:33.000000000 +0000 @@ -3,7 +3,7 @@ Manpage of CGDISK

CGDISK

-Section: GPT fdisk Manual (8)
Updated: 0.8.5
Index +Section: GPT fdisk Manual (8)
Updated: 0.8.6
Index Return to Main Contents
  @@ -322,7 +322,7 @@

BUGS

-As of May 2012 (version 0.8.5), cgdisk should be considered +As of January 2013 (version 0.8.6), cgdisk should be considered beta software. Although the underlying partition manipulation code is much older, the cgdisk ncurses user interface is brand new with GPT fdisk version 0.8.0. Known bugs and limitations include: @@ -472,6 +472,6 @@ This document was created by man2html, using the manual pages.
-Time: 15:38:43 GMT, May 30, 2012 +Time: 16:09:33 GMT, January 09, 2013 diff -Nru gdisk-0.8.5/current.spec gdisk-0.8.6/current.spec --- gdisk-0.8.5/current.spec 2012-05-30 15:38:43.000000000 +0000 +++ gdisk-0.8.6/current.spec 2013-01-09 16:09:33.000000000 +0000 @@ -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 @@ %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 -Nru gdisk-0.8.5/debian/changelog gdisk-0.8.6/debian/changelog --- gdisk-0.8.5/debian/changelog 2012-06-16 17:15:56.000000000 +0000 +++ gdisk-0.8.6/debian/changelog 2013-01-10 13:31:25.000000000 +0000 @@ -1,3 +1,15 @@ +gdisk (0.8.6-SprezzOS1) unstable; urgency=low + + * New upstream version 0.8.6 + + -- Nick Black Thu, 10 Jan 2013 08:29:38 -0500 + +gdisk (0.8.5-SprezzOS1) unstable; urgency=low + + * Rebuild against ICU 5 + + -- Nick Black Thu, 06 Dec 2012 04:03:49 -0500 + gdisk (0.8.5-1) unstable; urgency=low * New upstream release diff -Nru gdisk-0.8.5/debian/control gdisk-0.8.6/debian/control --- gdisk-0.8.5/debian/control 2012-03-05 20:32:34.000000000 +0000 +++ gdisk-0.8.6/debian/control 2013-01-10 13:31:25.000000000 +0000 @@ -1,7 +1,8 @@ Source: gdisk Section: admin Priority: extra -Maintainer: Guillaume Delacour +Maintainer: Nick Black +XSBC-Original-Maintainer: Guillaume Delacour Build-Depends: debhelper (>= 9), libpopt-dev, uuid-dev, libicu-dev, libncurses5-dev Standards-Version: 3.9.3 diff -Nru gdisk-0.8.5/debian/patches/manpages.diff gdisk-0.8.6/debian/patches/manpages.diff --- gdisk-0.8.5/debian/patches/manpages.diff 2012-06-16 12:43:40.000000000 +0000 +++ gdisk-0.8.6/debian/patches/manpages.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -From: Guillaume Delacour -Subject: Fix minor errors in manpages (hyphen as minus) -Last-Update: 2012-06-16 -Forwarded: no - ---- a/sgdisk.8 -+++ b/sgdisk.8 -@@ -165,7 +165,7 @@ - \fItoggle\fR options enable you to change the attribute bit value. The - \fIset\fR, \fIclear\fR, \fItoggle\fR, and \fIget\fR options work on a - bit number; the others work on a hexadecimal bit mask. For example, type --\fBsgdisk -A 4:set:2 /dev/sdc\fR to set the bit 2 attribute (legacy BIOS -+\fBsgdisk \-A 4:set:2 /dev/sdc\fR to set the bit 2 attribute (legacy BIOS - bootable) on partition 4 on \fI/dev/sdc\fR. - - .TP -@@ -346,7 +346,7 @@ - Clear out all partition data. This includes GPT header data, all partition - definitions, and the protective MBR. Note that this operation will, like - most other operations, fail on a damaged disk. If you want to prepare a --disk you know to be damaged for GPT use, you should first wipe it with -Z -+disk you know to be damaged for GPT use, you should first wipe it with \-Z - and then partition it normally. This option will work even if the - disk's original partition table is bad; however, most other options on the - same command line will be ignored. -@@ -487,7 +487,7 @@ - - .TP - .B 8 --Disk replication operation (-R) failed -+Disk replication operation (\-R) failed - - .SH "BUGS" - As of May 2012 (version 0.8.5), \fBsgdisk\fR diff -Nru gdisk-0.8.5/debian/patches/series gdisk-0.8.6/debian/patches/series --- gdisk-0.8.5/debian/patches/series 2012-06-16 12:41:09.000000000 +0000 +++ gdisk-0.8.6/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -manpages.diff diff -Nru gdisk-0.8.5/diskio-unix.cc gdisk-0.8.6/diskio-unix.cc --- gdisk-0.8.5/diskio-unix.cc 2012-05-30 15:38:42.000000000 +0000 +++ gdisk-0.8.6/diskio-unix.cc 2013-01-09 16:09:33.000000000 +0000 @@ -132,6 +132,9 @@ // (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 @@ #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 @@ 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 @@ 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 @@ *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 -Nru gdisk-0.8.5/diskio.h gdisk-0.8.6/diskio.h --- gdisk-0.8.5/diskio.h 2012-05-30 15:38:42.000000000 +0000 +++ gdisk-0.8.6/diskio.h 2013-01-09 16:09:33.000000000 +0000 @@ -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 -Nru gdisk-0.8.5/fixparts.8 gdisk-0.8.6/fixparts.8 --- gdisk-0.8.5/fixparts.8 2012-05-30 15:38:43.000000000 +0000 +++ gdisk-0.8.6/fixparts.8 2013-01-09 16:09:33.000000000 +0000 @@ -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" @@ -39,13 +39,13 @@ Additional features include the ability to change partition type codes or boot/active flags, to delete partitions, and to recompute CHS values. With the possible exception of recomputing CHS values, these secondary features -are better performed with \fBfdisk\fR, because \fBfixpart\fR's design means +are better performed with \fBfdisk\fR, because \fBfixparts\fR' design means that it's likely to alter partition numbering even when such changes are not requested. -The \fBfixpart\fR program employs a user interface similar to that of -Linux's \fBfdisk\fR, but \fBfixpart\fR is much more specialized. Most -importantly, you can't create new partitions with \fBfixpart\fR, although +The \fBfixparts\fR program employs a user interface similar to that of +Linux's \fBfdisk\fR, but \fBfixparts\fR is much more specialized. Most +importantly, you can't create new partitions with \fBfixparts\fR, although you can change primary/logical assignment. In the MBR scheme, partitions come in three varieties: @@ -64,10 +64,10 @@ .TP .B logical A disk can contain an arbitrary number of logical partitions -(\fBfixpart\fR, however, imposes a limit of 124 logical partitions). All +(\fBfixparts\fR, however, imposes a limit of 124 logical partitions). All the logical partitions reside inside a single extended partition, and are defined using a linked-list data structure. This fact means that every -logical partition be preceded by at least one sector of unallocated space +logical partition must be preceded by at least one sector of unallocated space to hold its defining data structure (an Extended Boot Record, or EBR). .PP @@ -81,7 +81,7 @@ partition within an extended partition (which is just a specific type of primary partition). -Unlike most disk utilities, \fBfixpart\fR's user interface ignores extended +Unlike most disk utilities, \fBfixparts\fR' user interface ignores extended partitions. Internally, the program discards the information on the original extended partition and, when you tell it to save its changes, it generates a new extended partition to contain the then-defined logical @@ -89,19 +89,19 @@ tool performs require generating a fresh extended partition, so keeping the original in the user interface would only be a complication. -Another unusual feature of \fBfixpart\fR's user interface is that partition +Another unusual feature of \fBfixparts\fR' user interface is that partition numbers do not necessarily correlate with primary/logical status. In most utilities, partitions 1\-4 correspond to primary partitions, whereas -partitions 5 and up are logical partitions. In \fBfixpart\fR, any partition +partitions 5 and up are logical partitions. In \fBfixparts\fR, any partition number may be assigned primary or logical status, so long as the rules for layout described earlier are obeyed. When the partition table is saved, partitions will be assigned appropriately and then tools such as the Linux kernel and \fBfdisk\fR will give them conventional numbers. -When it first starts, \fBfixpart\fR performs a scan for GPT data. If the -disk looks like a conventional GPT disk, \fBfixpart\fR refuses to run. If +When it first starts, \fBfixparts\fR performs a scan for GPT data. If the +disk looks like a conventional GPT disk, \fBfixparts\fR refuses to run. If the disk appears to be a conventional MBR disk but GPT signatures are -present in the GPT primary or secondary header areas, \fBfixpart\fR +present in the GPT primary or secondary header areas, \fBfixparts\fR offers to delete this extraneous data. If you tell it to do so, the program immediately wipes the GPT header or headers. (If only one header was found, only that one header will be erased, to minimize the risk of damaging a @@ -109,7 +109,7 @@ headers.) With the exception of optionally erasing leftover GPT data when it first -starts, \fBfixpart\fR keeps all changes in memory until the user writes +starts, \fBfixparts\fR keeps all changes in memory until the user writes changes with the \fBw\fR command. Thus, you can adjust your partitions in the user interface and abort those changes by typing \fBq\fR to quit without saving changes. @@ -147,7 +147,7 @@ .TP .B o Omit a partition. Once omitted, the partition will still appear in the -\fBfixpart\fR partition list, but it will be flagged as omitted. You can +\fBfixparts\fR partition list, but it will be flagged as omitted. You can subsequently convert it to primary or logical form with the \fBr\fR or \fBl\fR commands, respectively. When you save your changes with \fBw\fR, though, the partition will be lost. @@ -202,7 +202,7 @@ .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 -Nru gdisk-0.8.5/fixparts.html gdisk-0.8.6/fixparts.html --- gdisk-0.8.5/fixparts.html 2012-05-30 15:38:43.000000000 +0000 +++ gdisk-0.8.6/fixparts.html 2013-01-09 16:09:33.000000000 +0000 @@ -3,7 +3,7 @@ Manpage of FIXPARTS

FIXPARTS

-Section: FixParts Manual (8)
Updated: 0.8.5
Index +Section: FixParts Manual (8)
Updated: 0.8.6
Index Return to Main Contents
  @@ -58,13 +58,13 @@ Additional features include the ability to change partition type codes or boot/active flags, to delete partitions, and to recompute CHS values. With the possible exception of recomputing CHS values, these secondary features -are better performed with fdisk, because fixpart's design means +are better performed with fdisk, because fixparts' design means that it's likely to alter partition numbering even when such changes are not requested.

-The fixpart program employs a user interface similar to that of -Linux's fdisk, but fixpart is much more specialized. Most -importantly, you can't create new partitions with fixpart, although +The fixparts program employs a user interface similar to that of +Linux's fdisk, but fixparts is much more specialized. Most +importantly, you can't create new partitions with fixparts, although you can change primary/logical assignment.

In the MBR scheme, partitions come in three varieties: @@ -87,10 +87,10 @@

A disk can contain an arbitrary number of logical partitions -(fixpart, however, imposes a limit of 124 logical partitions). All +(fixparts, however, imposes a limit of 124 logical partitions). All the logical partitions reside inside a single extended partition, and are defined using a linked-list data structure. This fact means that every -logical partition be preceded by at least one sector of unallocated space +logical partition must be preceded by at least one sector of unallocated space to hold its defining data structure (an Extended Boot Record, or EBR).

@@ -106,7 +106,7 @@ partition within an extended partition (which is just a specific type of primary partition).

-Unlike most disk utilities, fixpart's user interface ignores extended +Unlike most disk utilities, fixparts' user interface ignores extended partitions. Internally, the program discards the information on the original extended partition and, when you tell it to save its changes, it generates a new extended partition to contain the then-defined logical @@ -114,19 +114,19 @@ tool performs require generating a fresh extended partition, so keeping the original in the user interface would only be a complication.

-Another unusual feature of fixpart's user interface is that partition +Another unusual feature of fixparts' user interface is that partition numbers do not necessarily correlate with primary/logical status. In most utilities, partitions 1-4 correspond to primary partitions, whereas -partitions 5 and up are logical partitions. In fixpart, any partition +partitions 5 and up are logical partitions. In fixparts, any partition number may be assigned primary or logical status, so long as the rules for layout described earlier are obeyed. When the partition table is saved, partitions will be assigned appropriately and then tools such as the Linux kernel and fdisk will give them conventional numbers.

-When it first starts, fixpart performs a scan for GPT data. If the -disk looks like a conventional GPT disk, fixpart refuses to run. If +When it first starts, fixparts performs a scan for GPT data. If the +disk looks like a conventional GPT disk, fixparts refuses to run. If the disk appears to be a conventional MBR disk but GPT signatures are -present in the GPT primary or secondary header areas, fixpart +present in the GPT primary or secondary header areas, fixparts offers to delete this extraneous data. If you tell it to do so, the program immediately wipes the GPT header or headers. (If only one header was found, only that one header will be erased, to minimize the risk of damaging a @@ -134,7 +134,7 @@ headers.)

With the exception of optionally erasing leftover GPT data when it first -starts, fixpart keeps all changes in memory until the user writes +starts, fixparts keeps all changes in memory until the user writes changes with the w command. Thus, you can adjust your partitions in the user interface and abort those changes by typing q to quit without saving changes. @@ -179,7 +179,7 @@

Omit a partition. Once omitted, the partition will still appear in the -fixpart partition list, but it will be flagged as omitted. You can +fixparts partition list, but it will be flagged as omitted. You can subsequently convert it to primary or logical form with the r or l commands, respectively. When you save your changes with w, though, the partition will be lost. @@ -245,7 +245,7 @@  

BUGS

-As of May 2012 (version 0.8.5), fixparts +As of January 2013 (version 0.8.6), fixparts should be considered beta software. Known bugs and limitations include:

@@ -357,6 +357,6 @@ This document was created by man2html, using the manual pages.
-Time: 15:38:43 GMT, May 30, 2012 +Time: 16:09:33 GMT, January 09, 2013 diff -Nru gdisk-0.8.5/gdisk.8 gdisk-0.8.6/gdisk.8 --- gdisk-0.8.5/gdisk.8 2012-05-30 15:38:43.000000000 +0000 +++ gdisk-0.8.6/gdisk.8 2013-01-09 16:09:33.000000000 +0000 @@ -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 @@ 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 -Nru gdisk-0.8.5/gdisk.html gdisk-0.8.6/gdisk.html --- gdisk-0.8.5/gdisk.html 2012-05-30 15:38:43.000000000 +0000 +++ gdisk-0.8.6/gdisk.html 2013-01-09 16:09:33.000000000 +0000 @@ -3,7 +3,7 @@ Manpage of GDISK

GDISK

-Section: GPT fdisk Manual (8)
Updated: 0.8.5
Index +Section: GPT fdisk Manual (8)
Updated: 0.8.6
Index Return to Main Contents
  @@ -656,7 +656,7 @@  

BUGS

-As of May 2012 (version 0.8.5), gdisk +As of January 2013 (version 0.8.6), gdisk should be considered beta software. Known bugs and limitations include:

@@ -816,6 +816,6 @@ This document was created by man2html, using the manual pages.
-Time: 15:38:43 GMT, May 30, 2012 +Time: 16:09:33 GMT, January 09, 2013 diff -Nru gdisk-0.8.5/gpt.cc gdisk-0.8.6/gpt.cc --- gdisk-0.8.5/gpt.cc 2012-05-30 15:38:42.000000000 +0000 +++ gdisk-0.8.6/gpt.cc 2013-01-09 16:09:33.000000000 +0000 @@ -3,7 +3,7 @@ /* By Rod Smith, initial coding January to February, 2009 */ -/* This program is copyright (c) 2009-2011 by Roderick W. Smith. It is distributed +/* This program is copyright (c) 2009-2012 by Roderick W. Smith. It is distributed under the terms of the GNU GPL version 2, as detailed in the COPYING file. */ #define __STDC_LIMIT_MACROS @@ -259,6 +259,14 @@ << "The 'e' option on the experts' menu may fix this problem.\n"; } // if + if ((mainHeader.lastUsableLBA >= diskSize) || (mainHeader.lastUsableLBA > mainHeader.backupLBA)) { + problems++; + 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.... problems += FindOverlaps(); @@ -1018,6 +1026,21 @@ } // if/else quiet } // if + if ((mainHeader.lastUsableLBA >= diskSize) || (mainHeader.lastUsableLBA > mainHeader.backupLBA)) { + if (quiet == 0) { + cout << "Warning! The claimed last usable sector is incorrect! Do you want to correct\n" + << "this problem? "; + if (GetYN() == 'Y') { + MoveSecondHeaderToEnd(); + cout << "Have adjusted the second header and last usable sector value.\n"; + } else { + cout << "Have not corrected the problem. Strange problems may occur in the future!\n"; + } // if correction requested + } else { // go ahead and do correction automatically + MoveSecondHeaderToEnd(); + } // if/else quiet + } // if + // Check for overlapping or insane partitions.... if ((FindOverlaps() > 0) || (FindInsanePartitions() > 0)) { allOK = 0; @@ -1718,7 +1741,7 @@ 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 @@ -2196,12 +2219,12 @@ // sector size), but not by the previously-located alignment value, then the // alignment value is adjusted down. If the computed alignment is less than 8 // and the disk is bigger than SMALLEST_ADVANCED_FORMAT, resets it to 8. This -// is a safety measure for WD Advanced Format and similar drives. If no partitions -// are defined, the alignment value is set to DEFAULT_ALIGNMENT (2048) (or an +// is a safety measure for Advanced Format drives. If no partitions are +// defined, the alignment value is set to DEFAULT_ALIGNMENT (2048) (or an // adjustment of that based on the current sector size). The result is that new // drives are aligned to 2048-sector multiples but the program won't complain // about other alignments on existing disks unless a smaller-than-8 alignment -// is used on big disks (as safety for WD Advanced Format drives). +// is used on big disks (as safety for Advanced Format drives). // Returns the computed alignment value. uint32_t GPTData::ComputeAlignment(void) { uint32_t i = 0, found, exponent = 31; diff -Nru gdisk-0.8.5/gpt.h gdisk-0.8.6/gpt.h --- gdisk-0.8.5/gpt.h 2012-05-30 15:38:42.000000000 +0000 +++ gdisk-0.8.6/gpt.h 2013-01-09 16:09:33.000000000 +0000 @@ -183,7 +183,7 @@ int IsFree(uint64_t sector, uint32_t *partNum = NULL); int IsFreePartNum(uint32_t partNum); int IsUsedPartNum(uint32_t partNum); - + // Change how functions work, or return information on same void SetAlignment(uint32_t n); uint32_t ComputeAlignment(void); // Set alignment based on current partitions diff -Nru gdisk-0.8.5/gptcl.cc gdisk-0.8.6/gptcl.cc --- gdisk-0.8.5/gptcl.cc 2012-05-30 15:38:42.000000000 +0000 +++ gdisk-0.8.6/gptcl.cc 2013-01-09 16:09:33.000000000 +0000 @@ -49,7 +49,7 @@ 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 @@ 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 @@ // 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 @@ } // 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 @@ 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 @@ 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 @@ 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 @@ // 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 retVal = ""; int foundLast = 0; int numFound = 0; - + if (argument[0] == ':') argument.erase(0, 1); while ((numFound < itemNum) && (!foundLast)) { @@ -538,6 +543,6 @@ } // while if ((numFound == itemNum) && (numFound > 0)) retVal = argument.substr(startPos, endPos - startPos); - + return retVal; } // GetString() diff -Nru gdisk-0.8.5/gptcurses.cc gdisk-0.8.6/gptcurses.cc --- gdisk-0.8.5/gptcurses.cc 2012-05-30 15:38:42.000000000 +0000 +++ gdisk-0.8.6/gptcurses.cc 2013-01-09 16:09:33.000000000 +0000 @@ -219,7 +219,9 @@ 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 @@ // 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 -Nru gdisk-0.8.5/gptpart.cc gdisk-0.8.6/gptpart.cc --- gdisk-0.8.5/gptpart.cc 2012-05-30 15:38:42.000000000 +0000 +++ gdisk-0.8.6/gptpart.cc 2013-01-09 16:09:33.000000000 +0000 @@ -114,6 +114,7 @@ // Set the name for a partition to theName, using a Unicode string as // input. void GPTPart::SetName(const UnicodeString & theName) { + cout << "Entering GPTPart::SetName(const UnicodeString...)\n"; if (theName.isBogus()) { cerr << "Bogus UTF-16 name found in GPTPart::SetName()! Name not changed!\n"; } else { @@ -138,7 +139,7 @@ memset(name, 0, NAME_SIZE); for (i = 0; i < length; i++) name[i * 2] = theName[i]; -} // GPTPart::SetName(), Windows version +} // GPTPart::SetName(), ASCII version #endif // Set the name for the partition based on the current GUID partition type @@ -276,13 +277,13 @@ 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 -Nru gdisk-0.8.5/gpttext.cc gdisk-0.8.6/gpttext.cc --- gdisk-0.8.5/gpttext.cc 2012-05-30 15:38:42.000000000 +0000 +++ gdisk-0.8.6/gpttext.cc 2013-01-09 16:09:33.000000000 +0000 @@ -452,7 +452,7 @@ if (eeFirst == 'Y') { hybridMBR.AddPart(0, hybridPart); } else { - hybridMBR.AddPart(3, hybridPart); + hybridMBR.AddPart(numPartsToCvt, hybridPart); } // else hybridMBR.SetHybrid(); diff -Nru gdisk-0.8.5/parttypes.cc gdisk-0.8.6/parttypes.cc --- gdisk-0.8.5/parttypes.cc 2012-05-30 15:38:42.000000000 +0000 +++ gdisk-0.8.6/parttypes.cc 2013-01-09 16:09:33.000000000 +0000 @@ -2,7 +2,7 @@ // Class to manage partition type codes -- a slight variant on MBR type // codes, GUID type codes, and associated names. -/* This program is copyright (c) 2009-2011 by Roderick W. Smith. It is distributed +/* This program is copyright (c) 2009-2012 by Roderick W. Smith. It is distributed under the terms of the GNU GPL version 2, as detailed in the COPYING file. */ #define __STDC_LIMIT_MACROS @@ -72,7 +72,8 @@ // on empty partition table entries.... AddType(0x0000, "00000000-0000-0000-0000-000000000000", "Unused entry", 0); - // DOS/Windows partition types, which confusingly Linux also uses in GPT + // DOS/Windows partition types, most of which are hidden from the "L" listing + // (they're available mainly for MBR-to-GPT conversions). AddType(0x0100, "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7", "Microsoft basic data", 0); // FAT-12 AddType(0x0400, "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7", "Microsoft basic data", 0); // FAT-16 < 32M AddType(0x0600, "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7", "Microsoft basic data", 0); // FAT-16 @@ -106,7 +107,7 @@ AddType(0x7f02, "2E0A753D-9E48-43B0-8337-B15192CB1B5E", "ChromeOS reserved"); // Linux-specific partition types.... - AddType(0x8200, "0657FD6D-A4AB-43C4-84E5-0933C84B4F4F", "Linux swap"); // Linux swap (or Solaris) + AddType(0x8200, "0657FD6D-A4AB-43C4-84E5-0933C84B4F4F", "Linux swap"); // Linux swap (or Solaris on MBR) AddType(0x8300, "0FC63DAF-8483-4772-8E79-3D69D8477DE4", "Linux filesystem"); // Linux native AddType(0x8301, "8DA63339-0007-60C0-C436-083AC8230908", "Linux reserved"); AddType(0x8e00, "E6D6D379-F507-44C2-A23C-238F2A3DF928", "Linux LVM"); @@ -171,10 +172,18 @@ AddType(0xc001, "75894C1E-3AEB-11D3-B7C1-7B03A0000000", "HP-UX data"); AddType(0xc002, "E2A1E728-32E3-11D6-A682-7B03A0000000", "HP-UX service"); + // Sony uses this GUID on some of its computers. + AddType(0xed00, "F4019732-066E-4E12-8273-346C5641494F", "Sony system partition"); + // EFI system and related partitions AddType(0xef00, "C12A7328-F81F-11D2-BA4B-00A0C93EC93B", "EFI System"); // Parted identifies these as having the "boot flag" set AddType(0xef01, "024DEE41-33E7-11D3-9D69-0008C781F39F", "MBR partition scheme"); // Used to nest MBR in GPT - AddType(0xef02, "21686148-6449-6E6F-744E-656564454649", "BIOS boot partition"); // Boot loader + AddType(0xef02, "21686148-6449-6E6F-744E-656564454649", "BIOS boot partition"); // Used by GRUB + + // VMWare ESX partition types codes + AddType(0xfb00, "AA31E02A-400F-11DB-9590-000C2911D1B8", "VMWare VMFS"); + AddType(0xfb01, "9198EFFC-31C0-11DB-8F78-000C2911D1B8", "VMWare reserved"); + AddType(0xfc00, "9D275380-40AD-11DB-BF97-000C2911D1B8", "VMWare kcore crash protection"); // A straggler Linux partition type.... AddType(0xfd00, "A19D880F-05FC-4D3B-A006-743F0F84911E", "Linux RAID"); @@ -250,7 +259,7 @@ } // 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 -Nru gdisk-0.8.5/sgdisk.8 gdisk-0.8.6/sgdisk.8 --- gdisk-0.8.5/sgdisk.8 2012-05-30 15:38:43.000000000 +0000 +++ gdisk-0.8.6/sgdisk.8 2013-01-09 16:09:33.000000000 +0000 @@ -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 @@ 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 -Nru gdisk-0.8.5/sgdisk.html gdisk-0.8.6/sgdisk.html --- gdisk-0.8.5/sgdisk.html 2012-05-30 15:38:43.000000000 +0000 +++ gdisk-0.8.6/sgdisk.html 2013-01-09 16:09:33.000000000 +0000 @@ -3,7 +3,7 @@ Manpage of SGDISK

SGDISK

-Section: GPT fdisk Manual (8)
Updated: 0.8.5
Index +Section: GPT fdisk Manual (8)
Updated: 0.8.6
Index Return to Main Contents
  @@ -563,7 +563,7 @@  

BUGS

-As of May 2012 (version 0.8.5), sgdisk +As of January 2013 (version 0.8.6), sgdisk should be considered beta software. Known bugs and limitations include:

@@ -711,6 +711,6 @@ This document was created by man2html, using the manual pages.
-Time: 15:38:43 GMT, May 30, 2012 +Time: 16:09:33 GMT, January 09, 2013 diff -Nru gdisk-0.8.5/support.h gdisk-0.8.6/support.h --- gdisk-0.8.5/support.h 2012-05-30 15:38:42.000000000 +0000 +++ gdisk-0.8.6/support.h 2013-01-09 16:09:33.000000000 +0000 @@ -8,7 +8,7 @@ #ifndef __GPTSUPPORT #define __GPTSUPPORT -#define GPTFDISK_VERSION "0.8.5" +#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