![Carlos Santos](/assets/img/avatar_default.png)
This version brings bug fixes, enhancements and a new script utility,
scriptlive. For detailed information see the release notes:
http://www.kernel.org/pub/linux/utils/util-linux/v2.35/v2.35-ReleaseNotes
Pull some fixed applied after the release.
Disable the use of code under GPLv3 included in hwclock since v2.30. The
subject was discussed upstream[1] and it was decided that hwclock will
be made GPLv2-only again in v2.36, so do it in advance in Buildroot.
Meanwhile, be warned that all OS images selecting hwclock built with
Buildroot since commit 74235a6854
(util-linux: bump to version 2.30)
contain code under GPLv3, which imposes some technical difficulties to
include in embedded systems. For more information see GPLv3, Section 6,
"Conveying Non-Source Forms", and the definitions of User Product and
Installation Information[2].
1. https://lore.kernel.org/util-linux/20200127202152.4jh2w4chch37wgee@ws.net.home/T/#t
2. https://www.gnu.org/licenses/gpl-3.0.html
Signed-off-by: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
63 lines
2.4 KiB
Diff
63 lines
2.4 KiB
Diff
From 9fabc6d5fae3da9106d41c40af6fbef6265ae11b Mon Sep 17 00:00:00 2001
|
|
From: Karel Zak <kzak@redhat.com>
|
|
Date: Thu, 23 Jan 2020 15:07:32 +0100
|
|
Subject: [PATCH] sfdisk: remove broken step alignment for --move
|
|
|
|
* remove unnecessary and broken step alignment
|
|
* improve reported information in move log
|
|
* improve final progress bar update
|
|
|
|
Addresses: https://github.com/karelzak/util-linux/issues/938
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
---
|
|
disk-utils/sfdisk.c | 13 ++++---------
|
|
1 file changed, 4 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
|
|
index 8f2edb87f..bb6e1c6df 100644
|
|
--- a/disk-utils/sfdisk.c
|
|
+++ b/disk-utils/sfdisk.c
|
|
@@ -430,11 +430,6 @@ static int move_partition_data(struct sfdisk *sf, size_t partno, struct fdisk_pa
|
|
step_bytes = io;
|
|
|
|
step = step_bytes / ss;
|
|
-
|
|
- /* align the step (note that nsectors does not have to be power of 2) */
|
|
- while (nsectors % step)
|
|
- step--;
|
|
-
|
|
nbytes = nsectors * ss;
|
|
|
|
DBG(MISC, ul_debug(" step: %ju (%zu bytes)", (uintmax_t)step, step_bytes));
|
|
@@ -485,15 +480,15 @@ static int move_partition_data(struct sfdisk *sf, size_t partno, struct fdisk_pa
|
|
fprintf(f, "# Disk: %s\n", devname);
|
|
fprintf(f, "# Partition: %zu\n", partno + 1);
|
|
fprintf(f, "# Operation: move data\n");
|
|
+ fprintf(f, "# Sector size: %zu\n", ss);
|
|
fprintf(f, "# Original start offset (sectors/bytes): %ju/%ju\n",
|
|
(uintmax_t)from, (uintmax_t)from * ss);
|
|
fprintf(f, "# New start offset (sectors/bytes): %ju/%ju\n",
|
|
(uintmax_t)to, (uintmax_t)to * ss);
|
|
fprintf(f, "# Area size (sectors/bytes): %ju/%ju\n",
|
|
(uintmax_t)nsectors, (uintmax_t)nsectors * ss);
|
|
- fprintf(f, "# Sector size: %zu\n", ss);
|
|
- fprintf(f, "# Step size (in bytes): %zu\n", step_bytes);
|
|
- fprintf(f, "# Steps: %ju\n", (uintmax_t)(nsectors / step));
|
|
+ fprintf(f, "# Step size (sectors/bytes): %zu/%zu\n", step, step_bytes);
|
|
+ fprintf(f, "# Steps: %ju\n", ((uintmax_t) nsectors / step) + 1);
|
|
fprintf(f, "#\n");
|
|
fprintf(f, "# <step>: <from> <to> (step offsets in bytes)\n");
|
|
}
|
|
@@ -584,7 +579,7 @@ static int move_partition_data(struct sfdisk *sf, size_t partno, struct fdisk_pa
|
|
fputc(' ', stdout);
|
|
fflush(stdout);
|
|
fputc('\r', stdout);
|
|
- fprintf(stdout, _("Moved %ju from %ju sectors (%.3f%%)."),
|
|
+ fprintf(stdout, _("Moved %ju from %ju sectors (%.0f%%)."),
|
|
i, nsectors,
|
|
100.0 / ((double) nsectors/(i+1)));
|
|
fputc('\n', stdout);
|
|
--
|
|
2.18.2
|
|
|