aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRod Smith <rodsmith@rodsbooks.com>2017-07-27 21:59:14 -0400
committerRod Smith <rodsmith@rodsbooks.com>2017-07-27 21:59:14 -0400
commitf1f6236fb44392bfe5673bc3889a2b17b1696b90 (patch)
treeff9f7c2adbb485e0490ce6f35fae72829296e866
parenteed1122809cb7c509e808c1e76853af23f8652c8 (diff)
downloadgptfdisk-f1f6236fb44392bfe5673bc3889a2b17b1696b90.tar.gz
Fixed a major bug that caused improper partition tables to be created.
Version 1.0.3 release.
-rw-r--r--NEWS7
-rw-r--r--cgdisk.82
-rw-r--r--current.spec8
-rw-r--r--fixparts.82
-rw-r--r--gdisk.82
-rw-r--r--gpt.cc1
-rw-r--r--sgdisk.82
-rw-r--r--support.h2
8 files changed, 17 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index 2e60015..88c72b2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+1.0.3 (7/27/2017):
+------------------
+
+- Fixed a major bug that caused invalid partition tables to be generated
+ when creating a new partition table (that is, partitioning a blank disk or
+ converting from MBR).
+
1.0.2 (7/26/2017):
------------------
diff --git a/cgdisk.8 b/cgdisk.8
index b09f6bf..1eb0453 100644
--- a/cgdisk.8
+++ b/cgdisk.8
@@ -1,6 +1,6 @@
.\" Copyright 2011-2017 Roderick W. Smith (rodsmith@rodsbooks.com)
.\" May be distributed under the GNU General Public License
-.TH "CGDISK" "8" "1.0.2" "Roderick W. Smith" "GPT fdisk Manual"
+.TH "CGDISK" "8" "1.0.3" "Roderick W. Smith" "GPT fdisk Manual"
.SH "NAME"
cgdisk \- Curses-based GUID partition table (GPT) manipulator
.SH "SYNOPSIS"
diff --git a/current.spec b/current.spec
index 25f2333..b16fbad 100644
--- a/current.spec
+++ b/current.spec
@@ -1,12 +1,12 @@
Summary: GPT partitioning and MBR repair software
Name: gptfdisk
-Version: 1.0.2
+Version: 1.0.3
Release: 1%{?dist}
License: GPLv2
URL: http://www.rodsbooks.com/gdisk
Group: Applications/System
-Source: http://www.rodsbooks.com/gdisk/gptfdisk-1.0.2.tar.gz
+Source: http://www.rodsbooks.com/gdisk/gptfdisk-1.0.3.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%description
@@ -81,5 +81,5 @@ provides a few additional partition manipulation features.
%changelog
-* Wed Jul 26 2017 R Smith <rodsmith@rodsbooks.com> - 1.0.2
-- Created spec file for 1.0.2 release
+* Thu Jul 27 2017 R Smith <rodsmith@rodsbooks.com> - 1.0.3
+- Created spec file for 1.0.3 release
diff --git a/fixparts.8 b/fixparts.8
index dd3cdf7..de30b6a 100644
--- a/fixparts.8
+++ b/fixparts.8
@@ -1,6 +1,6 @@
.\" Copyright 2011-2017 Roderick W. Smith (rodsmith@rodsbooks.com)
.\" May be distributed under the GNU General Public License
-.TH "FIXPARTS" "8" "1.0.2" "Roderick W. Smith" "FixParts Manual"
+.TH "FIXPARTS" "8" "1.0.3" "Roderick W. Smith" "FixParts Manual"
.SH "NAME"
fixparts \- MBR partition table repair utility
.SH "SYNOPSIS"
diff --git a/gdisk.8 b/gdisk.8
index f4cef83..c2cf83d 100644
--- a/gdisk.8
+++ b/gdisk.8
@@ -1,6 +1,6 @@
.\" Copyright 2011-2017 Roderick W. Smith (rodsmith@rodsbooks.com)
.\" May be distributed under the GNU General Public License
-.TH "GDISK" "8" "1.0.2" "Roderick W. Smith" "GPT fdisk Manual"
+.TH "GDISK" "8" "1.0.3" "Roderick W. Smith" "GPT fdisk Manual"
.SH "NAME"
gdisk \- Interactive GUID partition table (GPT) manipulator
.SH "SYNOPSIS"
diff --git a/gpt.cc b/gpt.cc
index 4f37323..03a2156 100644
--- a/gpt.cc
+++ b/gpt.cc
@@ -1924,6 +1924,7 @@ int GPTData::ClearGPTData(void) {
mainHeader.currentLBA = UINT64_C(1);
mainHeader.partitionEntriesLBA = (uint64_t) 2;
mainHeader.sizeOfPartitionEntries = GPT_SIZE;
+ mainHeader.firstUsableLBA = GetTableSizeInSectors() + mainHeader.partitionEntriesLBA;
for (i = 0; i < GPT_RESERVED; i++) {
mainHeader.reserved2[i] = '\0';
} // for
diff --git a/sgdisk.8 b/sgdisk.8
index 586b4ce..2cb18b9 100644
--- a/sgdisk.8
+++ b/sgdisk.8
@@ -1,6 +1,6 @@
.\" Copyright 2011-2017 Roderick W. Smith (rodsmith@rodsbooks.com)
.\" May be distributed under the GNU General Public License
-.TH "SGDISK" "8" "1.0.2" "Roderick W. Smith" "GPT fdisk Manual"
+.TH "SGDISK" "8" "1.0.3" "Roderick W. Smith" "GPT fdisk Manual"
.SH "NAME"
sgdisk \- Command\-line GUID partition table (GPT) manipulator for Linux and Unix
.SH "SYNOPSIS"
diff --git a/support.h b/support.h
index f8957aa..85324f6 100644
--- a/support.h
+++ b/support.h
@@ -8,7 +8,7 @@
#ifndef __GPTSUPPORT
#define __GPTSUPPORT
-#define GPTFDISK_VERSION "1.0.2"
+#define GPTFDISK_VERSION "1.0.3"
#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
// Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64