Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gptfdisk for openSUSE:Factory 
checked in at 2021-03-10 08:49:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gptfdisk (Old)
 and      /work/SRC/openSUSE:Factory/.gptfdisk.new.2378 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gptfdisk"

Wed Mar 10 08:49:40 2021 rev:21 rq:876937 version:1.0.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/gptfdisk/gptfdisk.changes        2021-02-18 
20:41:46.446746993 +0100
+++ /work/SRC/openSUSE:Factory/.gptfdisk.new.2378/gptfdisk.changes      
2021-03-10 08:49:51.218430588 +0100
@@ -1,0 +2,7 @@
+Tue Feb 16 00:22:32 UTC 2021 - Manfred Schwarb <manfre...@gmx.ch>
+
+- fix regression from version 1.0.6: misleading warning when reading MBR disks,
+    upstream commit f063fe08e424c99f133df18bf9dce49c851bcb0a 
+- Add fix-spurious-warnings.patch
+
+-------------------------------------------------------------------

New:
----
  fix-spurious-warnings.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gptfdisk.spec ++++++
--- /var/tmp/diff_new_pack.f3yDPf/_old  2021-03-10 08:49:51.638431021 +0100
+++ /var/tmp/diff_new_pack.f3yDPf/_new  2021-03-10 08:49:51.642431026 +0100
@@ -25,6 +25,7 @@
 URL:            http://rodsbooks.com/gdisk
 
 Source:         https://downloads.sf.net/%name/%name-%version.tar.gz
+Patch0:         fix-spurious-warnings.patch
 BuildRequires:  gcc-c++
 BuildRequires:  ncurses-devel
 BuildRequires:  pkgconfig(popt)

++++++ fix-spurious-warnings.patch ++++++
Commit f063fe08e424c99f133df18bf9dce49c851bcb0a:
Fixed bug that caused spurious warnings about the partition table
header claiming an invalid size of partition entries when reading
some MBR disks.
See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=981231

--- a/gpt.cc
+++ b/gpt.cc
@@ -1042,11 +1042,19 @@
    *crcOk = CheckHeaderCRC(&tempHeader);
 
    if (tempHeader.sizeOfPartitionEntries != sizeof(GPTPart)) {
-       cerr << "Warning: Partition table header claims that the size of 
partition table\n";
-       cerr << "entries is " << tempHeader.sizeOfPartitionEntries << " bytes, 
but this program ";
-       cerr << " supports only " << sizeof(GPTPart) << "-byte entries.\n";
-       cerr << "Adjusting accordingly, but partition table may be garbage.\n";
-       tempHeader.sizeOfPartitionEntries = sizeof(GPTPart);
+      // Print the below warning only if the CRC is OK -- but correct the
+      // problem either way. The warning is printed only on a valid CRC
+      // because otherwise this warning will display inappropriately when
+      // reading MBR disks. If the CRC is invalid, then a warning about
+      // that will be shown later, so the user will still know that
+      // something is wrong.
+      if (*crcOk) {
+         cerr << "Warning: Partition table header claims that the size of 
partition table\n";
+         cerr << "entries is " << tempHeader.sizeOfPartitionEntries << " 
bytes, but this program ";
+         cerr << " supports only " << sizeof(GPTPart) << "-byte entries.\n";
+         cerr << "Adjusting accordingly, but partition table may be 
garbage.\n";
+      }
+      tempHeader.sizeOfPartitionEntries = sizeof(GPTPart);
    }
 
    if (allOK && (numParts != tempHeader.numParts) && *crcOk) {

Reply via email to