Hello community,
here is the log from the commit of package gptfdisk for openSUSE:Factory checked in at 2013-11-21 15:25:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gptfdisk (Old)
and /work/SRC/openSUSE:Factory/.gptfdisk.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gptfdisk"
Changes:
--------
--- /work/SRC/openSUSE:Factory/gptfdisk/gptfdisk.changes 2013-08-01 06:54:45.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gptfdisk.new/gptfdisk.changes 2013-11-21 15:25:03.000000000 +0100
@@ -1,0 +2,16 @@
+Wed Nov 13 13:18:19 UTC 2013 - sweet_f_a@gmx.de
+
+- Update to new upstream release 0.8.8
+ * Fixed bug that could cause segfault when passing an invalid
+ partition number to sgdisk's -i/--info command.
+ * Added new partition type codes.
+ * Added a pause (with a prompt to hit <Enter>) to display more
+ items gdisk and cgdisk. There's no such pause/prompt in sgdisk,
+ though.
+ * Fine-tuned verification ('v') check for 0xEE partition that
+ doesn't begin on sector 1.
+ * Fixed hybrid MBR creation on disks larger than 2TiB
+ * Added check for an active/bootable 0xEE protective partition to
+ the verify ('v') function.
+
+-------------------------------------------------------------------
Old:
----
gptfdisk-0.8.7.tar.gz
New:
----
gptfdisk-0.8.8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gptfdisk.spec ++++++
--- /var/tmp/diff_new_pack.xFt9Wj/_old 2013-11-21 15:25:04.000000000 +0100
+++ /var/tmp/diff_new_pack.xFt9Wj/_new 2013-11-21 15:25:04.000000000 +0100
@@ -17,14 +17,14 @@
Name: gptfdisk
-Version: 0.8.7
+Version: 0.8.8
Release: 0
Summary: GPT partitioning and MBR repair software
License: GPL-2.0
Group: System/Base
Url: http://rodsbooks.com/gdisk
-#DL-URL: http://downloads.sf.net/gptfdisk/gptfdisk-0.8.6.tar.gz
+#DL-URL: http://downloads.sf.net/gptfdisk/gptfdisk-0.8.8.tar.gz
Source: http://downloads.sf.net/%{name}/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
++++++ gptfdisk-0.8.7.tar.gz -> gptfdisk-0.8.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/NEWS new/gptfdisk-0.8.8/NEWS
--- old/gptfdisk-0.8.7/NEWS 2013-07-09 04:01:10.000000000 +0200
+++ new/gptfdisk-0.8.8/NEWS 2013-10-14 18:05:45.000000000 +0200
@@ -1,3 +1,38 @@
+0.8.8 (10/14/2013):
+------------_------
+
+- Fixed bug that could cause segfault when passing an invalid partition
+ number to sgdisk's -i/--info command.
+
+- Added new type code: 933AC7E1-2EB4-4F13-B844-0E14E2AEF915, or gdisk code
+ 8302, for Linux /home partitions. This type code is used by recent
+ versions of systemd to permit /home to be auto-mounted; see
+ http://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.h...
+ for details.
+
+- Added new type code: 9E1A2D38-C612-4316-AA26-8B49521E5A8B, or gdisk code
+ 4100, for PowerPC PReP (PowerPC reference platform) boot.
+
+- The number of partition type codes has grown large enough that it fills
+ an 80x24 display. I've therefore added a pause (with a prompt to hit
+ <Enter>) to display more items after showing 21 lines in gdisk or after
+ the screen has nearly filled with entries in cgdisk. There's no such
+ pause/prompt in sgdisk, though.
+
+- Fine-tuned verification ('v') check for 0xEE partition that doesn't begin
+ on sector 1: Previously, a disk with multiple 0xEE partitions would
+ always trigger this warning. Now, the warning occurs only if NONE of the
+ 0xEE partitions begins on sector 1.
+
+- Fixed hybrid MBR creation on disks larger than 2TiB: Previously, if one
+ opted to create an extra partition to cover unused space following
+ hybridized partitions, gdisk would hang.
+
+- Added check for an active/bootable 0xEE protective partition to the
+ verify ('v') function. If found, this is not counted as an error, but
+ it is called out to the user, since it can cause some EFIs (such as
+ VirtualBox's EFI) to ignore the disk.
+
0.8.7 (7/8/2013):
-----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/attributes.cc new/gptfdisk-0.8.8/attributes.cc
--- old/gptfdisk-0.8.7/attributes.cc 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/attributes.cc 2013-10-14 18:05:44.000000000 +0200
@@ -3,7 +3,7 @@
// of which only four are currently (2/2011) documented on Wikipedia, and
// two others found from other sources.
-/* This program is copyright (c) 2009-2011 by Roderick W. Smith. It is distributed
+/* 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. */
#define __STDC_LIMIT_MACROS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/basicmbr.cc new/gptfdisk-0.8.8/basicmbr.cc
--- old/gptfdisk-0.8.7/basicmbr.cc 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/basicmbr.cc 2013-10-14 18:05:44.000000000 +0200
@@ -3,7 +3,7 @@
/* Initial coding by Rod Smith, January to February, 2009 */
-/* This program is copyright (c) 2009-2011 by Roderick W. Smith. It is distributed
+/* 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. */
#define __STDC_LIMIT_MACROS
@@ -701,10 +701,11 @@
return (retval);
} // BasicMBRData::LBAtoCHS()
-// Look for overlapping partitions.
+// Look for overlapping partitions. Also looks for a couple of non-error
+// conditions that the user should be told about.
// Returns the number of problems found
int BasicMBRData::FindOverlaps(void) {
- int i, j, numProbs = 0, numEE = 0;
+ int i, j, numProbs = 0, numEE = 0, ProtectiveOnOne = 0;
for (i = 0; i < MAX_MBR_PARTS; i++) {
for (j = i + 1; j < MAX_MBR_PARTS; j++) {
@@ -717,14 +718,17 @@
} // for (j...)
if (partitions[i].GetType() == 0xEE) {
numEE++;
- if (partitions[i].GetStartLBA() != 1)
- cout << "\nWarning: 0xEE partition doesn't start on sector 1. This can cause "
- << "problems\nin some OSes.\n";
+ if (partitions[i].GetStartLBA() == 1)
+ ProtectiveOnOne = 1;
} // if
} // for (i...)
+
if (numEE > 1)
cout << "\nCaution: More than one 0xEE MBR partition found. This can cause problems\n"
<< "in some OSes.\n";
+ if (!ProtectiveOnOne)
+ cout << "\nWarning: 0xEE partition doesn't start on sector 1. This can cause "
+ << "problems\nin some OSes.\n";
return numProbs;
} // BasicMBRData::FindOverlaps()
@@ -903,7 +907,7 @@
} // BasicMBRData::SpaceBeforeAllLogicals()
// Returns 1 if the partitions describe a legal layout -- all logicals
-// are contiguous and have at least one preceding empty partitions,
+// are contiguous and have at least one preceding empty sector,
// the number of primaries is under 4 (or under 3 if there are any
// logicals), there are no overlapping partitions, etc.
// Does NOT assume that primaries are numbered 1-4; uses the
@@ -921,6 +925,18 @@
return allOK;
} // BasicMBRData::IsLegal()
+// Returns 1 if the 0xEE partition in the protective/hybrid MBR is marked as
+// active/bootable.
+int BasicMBRData::IsEEActive(void) {
+ int i, IsActive = 0;
+
+ for (i = 0; i < MAX_MBR_PARTS; i++) {
+ if ((partitions[i].GetStatus() & 0x80) && (partitions[i].GetType() == 0xEE))
+ IsActive = 1;
+ }
+ return IsActive;
+} // BasicMBRData::IsEEActive()
+
// Finds the next in-use partition, starting with start (will return start
// if it's in use). Returns -1 if no subsequent partition is in use.
int BasicMBRData::FindNextInUse(int start) {
@@ -1044,6 +1060,7 @@
uint64_t selectedSegment = UINT64_C(0); // location of largest segment
uint64_t selectedSize = UINT64_C(0); // size of largest segment in blocks
int found = 0;
+ string anything;
do {
firstBlock = FindFirstAvailable(start);
@@ -1363,6 +1380,9 @@
uint64_t i;
int firstMoved;
+ if ((start >= (UINT32_MAX - 1)) || (start >= (diskSize - 1)))
+ return 0;
+
first = start;
// ...now search through all partitions; if first is within an
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/basicmbr.h new/gptfdisk-0.8.8/basicmbr.h
--- old/gptfdisk-0.8.7/basicmbr.h 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/basicmbr.h 2013-10-14 18:05:44.000000000 +0200
@@ -1,6 +1,6 @@
/* basicmbr.h -- MBR data structure definitions, types, and functions */
-/* This program is copyright (c) 2009 by Roderick W. Smith. It is distributed
+/* 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
@@ -103,6 +103,7 @@
int DoTheyFit(void);
int SpaceBeforeAllLogicals(void);
int IsLegal(void);
+ int IsEEActive(void);
int FindNextInUse(int start);
// Functions to create, delete, or change partitions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/cgdisk.8 new/gptfdisk-0.8.8/cgdisk.8
--- old/gptfdisk-0.8.7/cgdisk.8 2013-07-09 04:01:10.000000000 +0200
+++ new/gptfdisk-0.8.8/cgdisk.8 2013-10-14 18:05:45.000000000 +0200
@@ -1,6 +1,6 @@
.\" Copyright 2011-2013 Roderick W. Smith (rodsmith@rodsbooks.com)
.\" May be distributed under the GNU General Public License
-.TH "CGDISK" "8" "0.8.7" "Roderick W. Smith" "GPT fdisk Manual"
+.TH "CGDISK" "8" "0.8.8" "Roderick W. Smith" "GPT fdisk Manual"
.SH "NAME"
cgdisk \- Curses-based GUID partition table (GPT) manipulator
.SH "SYNOPSIS"
@@ -276,7 +276,7 @@
.SH "BUGS"
-As of July 2013 (version 0.8.7), \fBcgdisk\fR should be considered
+As of October 2013 (version 0.8.8), \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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/cgdisk.html new/gptfdisk-0.8.8/cgdisk.html
--- old/gptfdisk-0.8.7/cgdisk.html 2013-07-09 04:01:10.000000000 +0200
+++ new/gptfdisk-0.8.8/cgdisk.html 2013-10-14 18:05:45.000000000 +0200
@@ -3,7 +3,7 @@
<HTML><HEAD><TITLE>Manpage of CGDISK</TITLE>
</HEAD><BODY>
<H1>CGDISK</H1>
-Section: GPT fdisk Manual (8)<BR>Updated: 0.8.7<BR><A HREF="#index">Index</A>
+Section: GPT fdisk Manual (8)<BR>Updated: 0.8.8<BR><A HREF="#index">Index</A>
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
@@ -330,7 +330,7 @@
<H2>BUGS</H2>
<P>
-As of July 2013 (version 0.8.7), <B>cgdisk</B> should be considered
+As of October 2013 (version 0.8.8), <B>cgdisk</B> should be considered
beta software. Although the underlying partition manipulation code is much
older, the <B>cgdisk</B> ncurses user interface is brand new with GPT fdisk
version 0.8.0. Known bugs and limitations include:
@@ -480,6 +480,6 @@
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 02:01:10 GMT, July 09, 2013
+Time: 16:05:45 GMT, October 14, 2013
</BODY>
</HTML>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/current.spec new/gptfdisk-0.8.8/current.spec
--- old/gptfdisk-0.8.7/current.spec 2013-07-09 04:01:10.000000000 +0200
+++ new/gptfdisk-0.8.8/current.spec 2013-10-14 18:05:45.000000000 +0200
@@ -1,11 +1,11 @@
Summary: GPT partitioning and MBR repair software
Name: gptfdisk
-Version: 0.8.7
+Version: 0.8.8
Release: 1%{?dist}
License: GPLv2
URL: http://www.rodsbooks.com/gdisk
Group: Applications/System
-Source: http://www.rodsbooks.com/gdisk/gptfdisk-0.8.7.tar.gz
+Source: http://www.rodsbooks.com/gdisk/gptfdisk-0.8.8.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%description
@@ -80,5 +80,5 @@
%changelog
-* Mon Jul 8 2013 R Smith - 0.8.7
-- Created spec file for 0.8.7 release
+* Mon Oct 14 2013 R Smith - 0.8.8
+- Created spec file for 0.8.8 release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/diskio-unix.cc new/gptfdisk-0.8.8/diskio-unix.cc
--- old/gptfdisk-0.8.7/diskio-unix.cc 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/diskio-unix.cc 2013-10-14 18:05:44.000000000 +0200
@@ -19,6 +19,7 @@
#include
#include <string>
#include
+#include
#include
#include
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/fixparts.8 new/gptfdisk-0.8.8/fixparts.8
--- old/gptfdisk-0.8.7/fixparts.8 2013-07-09 04:01:10.000000000 +0200
+++ new/gptfdisk-0.8.8/fixparts.8 2013-10-14 18:05:45.000000000 +0200
@@ -1,6 +1,6 @@
.\" Copyright 2011-2013 Roderick W. Smith (rodsmith@rodsbooks.com)
.\" May be distributed under the GNU General Public License
-.TH "FIXPARTS" "8" "0.8.7" "Roderick W. Smith" "FixParts Manual"
+.TH "FIXPARTS" "8" "0.8.8" "Roderick W. Smith" "FixParts Manual"
.SH "NAME"
fixparts \- MBR partition table repair utility
.SH "SYNOPSIS"
@@ -202,7 +202,7 @@
.PP
.SH "BUGS"
-As of July 2013 (version 0.8.7), \fBfixparts\fR
+As of October 2013 (version 0.8.8), \fBfixparts\fR
should be considered beta software. Known bugs and limitations include:
.TP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/fixparts.html new/gptfdisk-0.8.8/fixparts.html
--- old/gptfdisk-0.8.7/fixparts.html 2013-07-09 04:01:10.000000000 +0200
+++ new/gptfdisk-0.8.8/fixparts.html 2013-10-14 18:05:45.000000000 +0200
@@ -3,7 +3,7 @@
<HTML><HEAD><TITLE>Manpage of FIXPARTS</TITLE>
</HEAD><BODY>
<H1>FIXPARTS</H1>
-Section: FixParts Manual (8)<BR>Updated: 0.8.7<BR><A HREF="#index">Index</A>
+Section: FixParts Manual (8)<BR>Updated: 0.8.8<BR><A HREF="#index">Index</A>
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
@@ -245,7 +245,7 @@
<A NAME="lbAF"> </A>
<H2>BUGS</H2>
-As of July 2013 (version 0.8.7), <B>fixparts</B>
+As of October 2013 (version 0.8.8), <B>fixparts</B>
should be considered beta software. Known bugs and limitations include:
<P>
<DL COMPACT>
@@ -357,6 +357,6 @@
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 02:01:10 GMT, July 09, 2013
+Time: 16:05:45 GMT, October 14, 2013
</BODY>
</HTML>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/gdisk.8 new/gptfdisk-0.8.8/gdisk.8
--- old/gptfdisk-0.8.7/gdisk.8 2013-07-09 04:01:10.000000000 +0200
+++ new/gptfdisk-0.8.8/gdisk.8 2013-10-14 18:05:45.000000000 +0200
@@ -1,6 +1,6 @@
.\" Copyright 2011-2013 Roderick W. Smith (rodsmith@rodsbooks.com)
.\" May be distributed under the GNU General Public License
-.TH "GDISK" "8" "0.8.7" "Roderick W. Smith" "GPT fdisk Manual"
+.TH "GDISK" "8" "0.8.8" "Roderick W. Smith" "GPT fdisk Manual"
.SH "NAME"
gdisk \- Interactive GUID partition table (GPT) manipulator
.SH "SYNOPSIS"
@@ -128,7 +128,7 @@
.SH "OPTIONS"
.TP
.B \-l
-List the partition tables for the specified devices and then exit.
+List the partition table for the specified device and then exits.
.PP
Most interactions with \fBgdisk\fR
@@ -561,7 +561,7 @@
usually bypasses the prompt entirely.
.SH "BUGS"
-As of July 2013 (version 0.8.7), \fBgdisk\fR
+As of October 2013 (version 0.8.8), \fBgdisk\fR
should be considered beta software. Known bugs and limitations include:
.TP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/gdisk.cc new/gptfdisk-0.8.8/gdisk.cc
--- old/gptfdisk-0.8.7/gdisk.cc 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/gdisk.cc 2013-10-14 18:05:44.000000000 +0200
@@ -4,7 +4,7 @@
//
// by Rod Smith, project began February 2009
-/* This program is copyright (c) 2009-2011 by Roderick W. Smith. It is distributed
+/* 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/gdisk.html new/gptfdisk-0.8.8/gdisk.html
--- old/gptfdisk-0.8.7/gdisk.html 2013-07-09 04:01:10.000000000 +0200
+++ new/gptfdisk-0.8.8/gdisk.html 2013-10-14 18:05:45.000000000 +0200
@@ -3,7 +3,7 @@
<HTML><HEAD><TITLE>Manpage of GDISK</TITLE>
</HEAD><BODY>
<H1>GDISK</H1>
-Section: GPT fdisk Manual (8)<BR>Updated: 0.8.7<BR><A HREF="#index">Index</A>
+Section: GPT fdisk Manual (8)<BR>Updated: 0.8.8<BR><A HREF="#index">Index</A>
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
@@ -152,7 +152,7 @@
<DT><B>-l</B>
<DD>
-List the partition tables for the specified devices and then exit.
+List the partition table for the specified device and then exits.
</DL>
<P>
@@ -656,7 +656,7 @@
<A NAME="lbAF"> </A>
<H2>BUGS</H2>
-As of July 2013 (version 0.8.7), <B>gdisk</B>
+As of October 2013 (version 0.8.8), <B>gdisk</B>
should be considered beta software. Known bugs and limitations include:
<P>
<DL COMPACT>
@@ -816,6 +816,6 @@
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 02:01:10 GMT, July 09, 2013
+Time: 16:05:45 GMT, October 14, 2013
</BODY>
</HTML>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/gpt.cc new/gptfdisk-0.8.8/gpt.cc
--- old/gptfdisk-0.8.7/gpt.cc 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/gpt.cc 2013-10-14 18:05:44.000000000 +0200
@@ -3,7 +3,7 @@
/* By Rod Smith, initial coding January to February, 2009 */
-/* This program is copyright (c) 2009-2012 by Roderick W. Smith. It is distributed
+/* 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. */
#define __STDC_LIMIT_MACROS
@@ -279,6 +279,15 @@
// Check for MBR-specific problems....
problems += VerifyMBR();
+ // Check for a 0xEE protective partition that's marked as active....
+ if (protectiveMBR.IsEEActive()) {
+ cout << "\nWarning: The 0xEE protective partition in the MBR is marked as active. This is\n"
+ << "technically a violation of the GPT specification, and can cause some EFIs to\n"
+ << "ignore the disk, but it is required to boot from a GPT disk on some BIOS-based\n"
+ << "computers. You can clear this flag by creating a fresh protective MBR using\n"
+ << "the 'n' option on the experts' menu.\n";
+ }
+
// Verify that partitions don't run into GPT data areas....
problems += CheckGPTSize();
@@ -564,7 +573,7 @@
mbrFirst = (uint64_t) protectiveMBR.GetFirstSector(i);
mbrLast = mbrFirst + (uint64_t) protectiveMBR.GetLength(i) - UINT64_C(1);
do {
- if ((partitions[j].GetFirstLBA() == mbrFirst) &&
+ if ((j < numParts) && (partitions[j].GetFirstLBA() == mbrFirst) &&
(partitions[j].GetLastLBA() == mbrLast) && (partitions[j].IsUsed()))
found = 1;
j++;
@@ -1402,10 +1411,10 @@
// Show detailed information on the specified partition
void GPTData::ShowPartDetails(uint32_t partNum) {
- if (!IsFreePartNum(partNum)) {
+ if ((partNum < numParts) && !IsFreePartNum(partNum)) {
partitions[partNum].ShowDetails(blockSize);
} else {
- cout << "Partition #" << partNum + 1 << " does not exist.";
+ cout << "Partition #" << partNum + 1 << " does not exist.\n";
} // if
} // GPTData::ShowPartDetails()
@@ -2323,32 +2332,38 @@
int retval = 0;
Attributes theAttr;
- if (command == "show") {
- ShowAttributes(partNum);
- } else if (command == "get") {
- GetAttribute(partNum, bits);
+ if (partNum >= (int) numParts) {
+ cerr << "Invalid partition number (" << partNum + 1 << ")\n";
+ retval = -1;
} else {
- theAttr = partitions[partNum].GetAttributes();
- if (theAttr.OperateOnAttributes(partNum, command, bits)) {
- partitions[partNum].SetAttributes(theAttr.GetAttributes());
- retval = 1;
+ if (command == "show") {
+ ShowAttributes(partNum);
+ } else if (command == "get") {
+ GetAttribute(partNum, bits);
} else {
- retval = -1;
- } // if/else
- } // if/elseif/else
+ theAttr = partitions[partNum].GetAttributes();
+ if (theAttr.OperateOnAttributes(partNum, command, bits)) {
+ partitions[partNum].SetAttributes(theAttr.GetAttributes());
+ retval = 1;
+ } else {
+ retval = -1;
+ } // if/else
+ } // if/elseif/else
+ } // if/else invalid partition #
return retval;
} // GPTData::ManageAttributes()
// Show all attributes for a specified partition....
void GPTData::ShowAttributes(const uint32_t partNum) {
- if (partitions[partNum].IsUsed())
+ if ((partNum < numParts) && partitions[partNum].IsUsed())
partitions[partNum].ShowAttributes(partNum);
} // GPTData::ShowAttributes
// Show whether a single attribute bit is set (terse output)...
void GPTData::GetAttribute(const uint32_t partNum, const string& attributeBits) {
- partitions[partNum].GetAttributes().OperateOnAttributes(partNum, "get", attributeBits);
+ if (partNum < numParts)
+ partitions[partNum].GetAttributes().OperateOnAttributes(partNum, "get", attributeBits);
} // GPTData::GetAttribute
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/gptcl.cc new/gptfdisk-0.8.8/gptcl.cc
--- old/gptfdisk-0.8.7/gptcl.cc 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/gptcl.cc 2013-10-14 18:05:44.000000000 +0200
@@ -1,7 +1,7 @@
/*
Implementation of GPTData class derivative with popt-based command
line processing
- Copyright (C) 2010-2011 Roderick W. Smith
+ Copyright (C) 2010-2013 Roderick W. Smith
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -131,7 +131,7 @@
Attributes::ListAttributes();
break;
case 'L':
- typeHelper.ShowAllTypes();
+ typeHelper.ShowAllTypes(0);
break;
case 'P':
pretend = 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/gptcl.h new/gptfdisk-0.8.8/gptcl.h
--- old/gptfdisk-0.8.7/gptcl.h 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/gptcl.h 2013-10-14 18:05:44.000000000 +0200
@@ -1,7 +1,7 @@
/*
Implementation of GPTData class derivative with popt-based command
line processing
- Copyright (C) 2010-2011 Roderick W. Smith
+ Copyright (C) 2010-2013 Roderick W. Smith
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/gptcurses.cc new/gptfdisk-0.8.8/gptcurses.cc
--- old/gptfdisk-0.8.7/gptcurses.cc 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/gptcurses.cc 2013-10-14 18:05:44.000000000 +0200
@@ -1,7 +1,7 @@
/*
* Implementation of GPTData class derivative with curses-based text-mode
* interaction
- * Copyright (C) 2011 Roderick W. Smith
+ * Copyright (C) 2011-2013 Roderick W. Smith
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -737,8 +737,9 @@
string drive="Disk Drive: ";
drive += device;
ostringstream size;
+
size << "Size: " << diskSize << ", " << BytesToIeee(diskSize, blockSize);
-
+
clear();
move(0, (COLS - title.length()) / 2);
printw(title.c_str());
@@ -811,7 +812,7 @@
def_prog_mode();
endwin();
- tempType.ShowAllTypes();
+ tempType.ShowAllTypes(LINES - 3);
cout << "\nPress the <Enter> key to continue: ";
cin.get(junk);
reset_prog_mode();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/gptcurses.h new/gptfdisk-0.8.8/gptcurses.h
--- old/gptfdisk-0.8.7/gptcurses.h 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/gptcurses.h 2013-10-14 18:05:44.000000000 +0200
@@ -1,7 +1,7 @@
/*
* Implementation of GPTData class derivative with curses-based text-mode
* interaction
- * Copyright (C) 2011 Roderick W. Smith
+ * Copyright (C) 2011-2013 Roderick W. Smith
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/gptpart.cc new/gptfdisk-0.8.8/gptpart.cc
--- old/gptfdisk-0.8.7/gptpart.cc 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/gptpart.cc 2013-10-14 18:05:44.000000000 +0200
@@ -4,7 +4,7 @@
// Description: Class to implement a SINGLE GPT partition
//
//
-// Author: Rod Smith , (C) 2009-2011
+// Author: Rod Smith , (C) 2009-2013
//
// Copyright: See COPYING file that comes with this distribution
//
@@ -213,12 +213,12 @@
cout << "Partition unique GUID: " << uniqueGUID << "\n";
cout << "First sector: " << firstLBA << " (at "
- << BytesToIeee(firstLBA, blockSize) << ")\n";
+ << BytesToIeee(firstLBA, blockSize) << ")\n";
cout << "Last sector: " << lastLBA << " (at "
- << BytesToIeee(lastLBA, blockSize) << ")\n";
+ << BytesToIeee(lastLBA, blockSize) << ")\n";
size = (lastLBA - firstLBA + 1);
cout << "Partition size: " << size << " sectors ("
- << BytesToIeee(size, blockSize) << ")\n";
+ << BytesToIeee(size, blockSize) << ")\n";
cout << "Attribute flags: ";
cout.fill('0');
cout.width(16);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/gpttext.cc new/gptfdisk-0.8.8/gpttext.cc
--- old/gptfdisk-0.8.7/gpttext.cc 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/gpttext.cc 2013-10-14 18:05:44.000000000 +0200
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2010-2011 <Roderick W. Smith>
+ Copyright (C) 2010-2013 <Roderick W. Smith>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/gpttext.h new/gptfdisk-0.8.8/gpttext.h
--- old/gptfdisk-0.8.7/gpttext.h 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/gpttext.h 2013-10-14 18:05:44.000000000 +0200
@@ -1,6 +1,6 @@
/*
Implementation of GPTData class derivative with basic text-mode interaction
- Copyright (C) 2010-2011 Roderick W. Smith
+ Copyright (C) 2010-2013 Roderick W. Smith
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/mbr.cc new/gptfdisk-0.8.8/mbr.cc
--- old/gptfdisk-0.8.7/mbr.cc 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/mbr.cc 2013-10-14 18:05:44.000000000 +0200
@@ -3,7 +3,7 @@
/* Initial coding by Rod Smith, January to February, 2009 */
-/* This program is copyright (c) 2009 by Roderick W. Smith. It is distributed
+/* 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. */
#define __STDC_LIMIT_MACROS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/mbr.h new/gptfdisk-0.8.8/mbr.h
--- old/gptfdisk-0.8.7/mbr.h 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/mbr.h 2013-10-14 18:05:44.000000000 +0200
@@ -1,6 +1,6 @@
/* mbr.h -- MBR data structure definitions, types, and functions */
-/* This program is copyright (c) 2009 by Roderick W. Smith. It is distributed
+/* 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/parttypes.cc new/gptfdisk-0.8.8/parttypes.cc
--- old/gptfdisk-0.8.7/parttypes.cc 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/parttypes.cc 2013-10-14 18:05:44.000000000 +0200
@@ -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-2012 by Roderick W. Smith. It is distributed
+/* 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. */
#define __STDC_LIMIT_MACROS
@@ -90,6 +90,11 @@
AddType(0x1c00, "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7", "Microsoft basic data", 0); // Hidden FAT-32 LBA
AddType(0x1e00, "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7", "Microsoft basic data", 0); // Hidden FAT-16 LBA
AddType(0x2700, "DE94BBA4-06D1-4D40-A16A-BFD50179D6AC", "Windows RE");
+
+ // PowerPC reference platform boot partition
+ AddType(0x4100, "9E1A2D38-C612-4316-AA26-8B49521E5A8B", "PowerPC PReP boot");
+
+ // Windows LDM ("dynamic disk") types
AddType(0x4200, "AF9B60A0-1431-4F62-BC68-3311714A69AD", "Windows LDM data"); // Logical disk manager
AddType(0x4201, "5808C8AA-7E8F-42E0-85D2-E1E90434CFB3", "Windows LDM metadata"); // Logical disk manager
@@ -110,6 +115,8 @@
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");
+ // See http://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.h...
+ AddType(0x8302, "933AC7E1-2EB4-4F13-B844-0E14E2AEF915", "Linux /home"); // Linux /home (auto-mounted by systemd)
// Used by Intel Rapid Start technology
AddType(0x8400, "D3BFE2DE-3DAF-11DF-BA40-E3A556D89593", "Intel Rapid Start");
@@ -348,11 +355,14 @@
// Displays the available types and my extended MBR codes for same....
// Note: This function assumes an 80-column display. On wider displays,
// it stops at under 80 columns; on narrower displays, lines will wrap
-// in an ugly way.
-void PartType::ShowAllTypes(void) const {
- int colCount = 1; // column count
+// in an ugly way. The maxLines value is the maximum number of lines
+// to display before prompting to continue, or 0 (or a negative value)
+// for no limit.
+void PartType::ShowAllTypes(int maxLines) const {
+ int colCount = 1, lineCount = 1;
size_t i;
AType* thisType = allTypes;
+ string line;
cout.unsetf(ios::uppercase);
while (thisType != NULL) {
@@ -363,17 +373,24 @@
cout << thisType->name.substr(0, 20);
for (i = 0; i < (20 - (thisType->name.substr(0, 20).length())); i++)
cout << " ";
- if ((colCount % 3) == 0)
- cout << "\n";
- else
+ if ((colCount % 3) == 0) {
+ if (thisType->next) {
+ cout << "\n";
+ if ((maxLines > 0) && (lineCount++ % maxLines) == 0) {
+ cout << "Press the <Enter> key to see more codes: ";
+ getline(cin, line);
+ } // if reached screen line limit
+ } // if there's another entry following this one
+ } else {
cout << " ";
+ }
colCount++;
} // if
thisType = thisType->next;
} // while
cout.fill(' ');
cout << "\n" << dec;
-} // PartType::ShowTypes()
+} // PartType::ShowAllTypes(int maxLines)
// Returns 1 if code is a valid extended MBR code, 0 if it's not
int PartType::Valid(uint16_t code) const {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/parttypes.h new/gptfdisk-0.8.8/parttypes.h
--- old/gptfdisk-0.8.7/parttypes.h 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/parttypes.h 2013-10-14 18:05:44.000000000 +0200
@@ -1,4 +1,4 @@
-/* This program is copyright (c) 2009 by Roderick W. Smith. It is distributed
+/* 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
@@ -60,7 +60,7 @@
uint16_t GetHexType() const;
// Information relating to all type data
- void ShowAllTypes(void) const;
+ void ShowAllTypes(int maxLines = 21) const;
int Valid(uint16_t code) const;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/sgdisk.8 new/gptfdisk-0.8.8/sgdisk.8
--- old/gptfdisk-0.8.7/sgdisk.8 2013-07-09 04:01:10.000000000 +0200
+++ new/gptfdisk-0.8.8/sgdisk.8 2013-10-14 18:05:45.000000000 +0200
@@ -1,6 +1,6 @@
.\" Copyright 2011-2013 Roderick W. Smith (rodsmith@rodsbooks.com)
.\" May be distributed under the GNU General Public License
-.TH "SGDISK" "8" "0.8.7" "Roderick W. Smith" "GPT fdisk Manual"
+.TH "SGDISK" "8" "0.8.8" "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 July 2013 (version 0.8.7), \fBsgdisk\fR
+As of October 2013 (version 0.8.8), \fBsgdisk\fR
should be considered beta software. Known bugs and limitations include:
.TP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/sgdisk.html new/gptfdisk-0.8.8/sgdisk.html
--- old/gptfdisk-0.8.7/sgdisk.html 2013-07-09 04:01:10.000000000 +0200
+++ new/gptfdisk-0.8.8/sgdisk.html 2013-10-14 18:05:45.000000000 +0200
@@ -3,7 +3,7 @@
<HTML><HEAD><TITLE>Manpage of SGDISK</TITLE>
</HEAD><BODY>
<H1>SGDISK</H1>
-Section: GPT fdisk Manual (8)<BR>Updated: 0.8.7<BR><A HREF="#index">Index</A>
+Section: GPT fdisk Manual (8)<BR>Updated: 0.8.8<BR><A HREF="#index">Index</A>
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
@@ -563,7 +563,7 @@
<A NAME="lbAG"> </A>
<H2>BUGS</H2>
-As of July 2013 (version 0.8.7), <B>sgdisk</B>
+As of October 2013 (version 0.8.8), <B>sgdisk</B>
should be considered beta software. Known bugs and limitations include:
<P>
<DL COMPACT>
@@ -711,6 +711,6 @@
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 02:01:10 GMT, July 09, 2013
+Time: 16:05:45 GMT, October 14, 2013
</BODY>
</HTML>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/support.cc new/gptfdisk-0.8.8/support.cc
--- old/gptfdisk-0.8.7/support.cc 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/support.cc 2013-10-14 18:05:44.000000000 +0200
@@ -3,7 +3,7 @@
// Primarily by Rod Smith, February 2009, but with a few functions
// copied from other sources (see attributions below).
-/* This program is copyright (c) 2009 by Roderick W. Smith. It is distributed
+/* 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. */
#define __STDC_LIMIT_MACROS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gptfdisk-0.8.7/support.h new/gptfdisk-0.8.8/support.h
--- old/gptfdisk-0.8.7/support.h 2013-07-09 04:01:09.000000000 +0200
+++ new/gptfdisk-0.8.8/support.h 2013-10-14 18:05:44.000000000 +0200
@@ -1,4 +1,4 @@
-/* This program is copyright (c) 2009 by Roderick W. Smith. It is distributed
+/* 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
@@ -8,7 +8,7 @@
#ifndef __GPTSUPPORT
#define __GPTSUPPORT
-#define GPTFDISK_VERSION "0.8.7"
+#define GPTFDISK_VERSION "0.8.8"
#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
// Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org