import gdisk-1.0.3-9.el8

This commit is contained in:
CentOS Sources 2022-03-24 07:57:19 +00:00 committed by Stepan Oksanichenko
parent 58348d8f41
commit a569a8aa6f
2 changed files with 21 additions and 9 deletions

View File

@ -1,4 +1,4 @@
From 904ce2993978f6cfbec986e051e55e34ad5d7292 Mon Sep 17 00:00:00 2001
From a7eaefd9bc4a91a4ca26146f784d40725cfe15fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
Date: Wed, 29 Sep 2021 15:33:33 +0200
Subject: [PATCH] Fix incorrect byte order of partition names on big-endian
@ -7,12 +7,12 @@ Subject: [PATCH] Fix incorrect byte order of partition names on big-endian
---
gdisk.8 | 8 ++++++++
gptcl.cc | 11 +++++++++++
gptpart.cc | 13 +++++++------
gptpart.cc | 14 +++++++-------
gptpart.h | 1 +
gpttext.cc | 20 ++++++++++++++++++++
gpttext.h | 1 +
sgdisk.8 | 8 ++++++++
7 files changed, 56 insertions(+), 6 deletions(-)
7 files changed, 56 insertions(+), 7 deletions(-)
diff --git a/gdisk.8 b/gdisk.8
index c2cf83d..071756c 100644
@ -70,10 +70,18 @@ index 6c36738..58afc8a 100644
SaveGPTBackup(backupFile);
free(backupFile);
diff --git a/gptpart.cc b/gptpart.cc
index 17d6f15..c2b6500 100644
index 17d6f15..82aeab0 100644
--- a/gptpart.cc
+++ b/gptpart.cc
@@ -234,7 +234,6 @@ void GPTPart::SetName(const string & theName) {
@@ -83,7 +83,6 @@ string GPTPart::GetDescription(void) {
size_t pos = 0 ;
while ( ( pos < NAME_SIZE ) && ( name[ pos ] != 0 ) ) {
uint16_t cp = name[ pos ++ ] ;
- if ( ! IsLittleEndian() ) ReverseBytes( & cp , 2 ) ;
// first to utf32
uint32_t uni ;
if ( cp < 0xd800 || cp > 0xdfff ) {
@@ -234,7 +233,6 @@ void GPTPart::SetName(const string & theName) {
// then to utf16le
if ( uni < 0x10000 ) {
name[ pos ] = (uint16_t) uni ;
@ -81,7 +89,7 @@ index 17d6f15..c2b6500 100644
pos ++ ;
} // if
else {
@@ -244,10 +243,8 @@ void GPTPart::SetName(const string & theName) {
@@ -244,10 +242,8 @@ void GPTPart::SetName(const string & theName) {
} // if
uni -= 0x10000 ;
name[ pos ] = (uint16_t)( uni >> 10 ) | 0xd800 ;
@ -92,7 +100,7 @@ index 17d6f15..c2b6500 100644
pos ++ ;
}
} // for
@@ -407,14 +404,18 @@ int GPTPart::DoTheyOverlap(const GPTPart & other) {
@@ -407,14 +403,18 @@ int GPTPart::DoTheyOverlap(const GPTPart & other) {
// Reverse the bytes of integral data types and of the UTF-16LE name;
// used on big-endian systems.
void GPTPart::ReversePartBytes(void) {
@ -203,5 +211,5 @@ index 2cb18b9..3bc51f2 100644
.B \-c, \-\-change\-name=partnum:name
Change the GPT name of a partition. This name is encoded as a UTF\-16
--
2.32.0
2.35.1

View File

@ -1,7 +1,7 @@
Summary: An fdisk-like partitioning tool for GPT disks
Name: gdisk
Version: 1.0.3
Release: 8%{?dist}
Release: 9%{?dist}
License: GPLv2
URL: http://www.rodsbooks.com/gdisk/
Group: System Environment/Base
@ -44,6 +44,10 @@ done
%{_mandir}/man8/fixparts.8*
%changelog
* Tue Mar 15 2022 Nikola Forró <nforro@redhat.com> - 1.0.3-9
- Fix double byteswap on big-endian systems also while reading partition names
related: #1899990
* Mon Oct 25 2021 Nikola Forró <nforro@redhat.com> - 1.0.3-8
- Add upstream tests as a gating test
related: #1899990