forked from pool/parted
Accepting request 42313 from Base:System
Copy from Base:System/parted based on submit request 42313 from user puzel OBS-URL: https://build.opensuse.org/request/show/42313 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/parted?expand=0&rev=49
This commit is contained in:
commit
ff9d0e02d3
44
make-align-check-work-in-interactive-mode.patch
Normal file
44
make-align-check-work-in-interactive-mode.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
Index: parted-2.2/parted/parted.c
|
||||||
|
===================================================================
|
||||||
|
--- parted-2.2.orig/parted/parted.c 2010-06-30 13:10:27.000000000 +0200
|
||||||
|
+++ parted-2.2/parted/parted.c 2010-06-30 13:11:09.000000000 +0200
|
||||||
|
@@ -2135,18 +2135,33 @@ do_align_check (PedDevice **dev)
|
||||||
|
{
|
||||||
|
PedDisk *disk = ped_disk_new (*dev);
|
||||||
|
if (!disk)
|
||||||
|
- return 0;
|
||||||
|
+ goto error;
|
||||||
|
|
||||||
|
- enum AlignmentType align_type;
|
||||||
|
+ enum AlignmentType align_type = PA_OPTIMUM;
|
||||||
|
PedPartition *part = NULL;
|
||||||
|
- bool aligned =
|
||||||
|
- (command_line_get_align_type (_("alignment type(min/opt)"), &align_type)
|
||||||
|
- && command_line_get_partition (_("Partition number?"), disk, &part)
|
||||||
|
- && partition_align_check (disk, part, align_type));
|
||||||
|
+
|
||||||
|
+ if (!command_line_get_align_type (_("alignment type(min/opt)"), &align_type))
|
||||||
|
+ goto error_destroy_disk;
|
||||||
|
+ if (!command_line_get_partition (_("Partition number?"), disk, &part))
|
||||||
|
+ goto error_destroy_disk;
|
||||||
|
+
|
||||||
|
+ bool aligned = partition_align_check (disk, part, align_type);
|
||||||
|
+ if (!opt_script_mode)
|
||||||
|
+ printf(aligned ? _("%d aligned\n") : _("%d not aligned\n"), part->num);
|
||||||
|
|
||||||
|
ped_disk_destroy (disk);
|
||||||
|
|
||||||
|
+ if (opt_script_mode)
|
||||||
|
return aligned ? 1 : 0;
|
||||||
|
+
|
||||||
|
+ /* Always return 1 in interactive mode, to be consistent
|
||||||
|
+ with the other modes. */
|
||||||
|
+ return 1;
|
||||||
|
+
|
||||||
|
+error_destroy_disk:
|
||||||
|
+ ped_disk_destroy (disk);
|
||||||
|
+error:
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
@ -1,3 +1,19 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 30 11:12:03 UTC 2010 - puzel@novell.com
|
||||||
|
|
||||||
|
- update make-align-check-work-in-interactive-mode.patch to
|
||||||
|
be consistent with upstream
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de
|
||||||
|
|
||||||
|
- use %_smp_mflags
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 27 15:36:51 UTC 2010 - puzel@novell.com
|
||||||
|
|
||||||
|
- add make-align-check-work-in-interactive-mode.patch (bnc#608704)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Apr 2 08:41:02 UTC 2010 - puzel@novell.com
|
Fri Apr 2 08:41:02 UTC 2010 - puzel@novell.com
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
Name: parted
|
Name: parted
|
||||||
Version: 2.2
|
Version: 2.2
|
||||||
Release: 1
|
Release: 2
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Summary: GNU partitioner
|
Summary: GNU partitioner
|
||||||
Url: http://www.gnu.org/software/parted/
|
Url: http://www.gnu.org/software/parted/
|
||||||
@ -42,6 +42,8 @@ Patch10: fix-dm-partition-name.patch
|
|||||||
Patch11: do-not-create-dm-nodes.patch
|
Patch11: do-not-create-dm-nodes.patch
|
||||||
#PATCH-FIX-UPSTREAM parted-remove-experimental-warning.patch
|
#PATCH-FIX-UPSTREAM parted-remove-experimental-warning.patch
|
||||||
Patch12: parted-remove-experimental-warning.patch
|
Patch12: parted-remove-experimental-warning.patch
|
||||||
|
#PATCH-FIX-UPSTREAM make-align-check-work-in-interactive-mode.patch bnc#608704 petr.uzel@centrum.cz
|
||||||
|
Patch13: make-align-check-work-in-interactive-mode.patch
|
||||||
|
|
||||||
Requires: /sbin/udevadm
|
Requires: /sbin/udevadm
|
||||||
BuildRequires: check-devel
|
BuildRequires: check-devel
|
||||||
@ -96,6 +98,7 @@ to develop applications that require these.
|
|||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
|
%patch13 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
AUTOPOINT=true autoreconf --force --install
|
AUTOPOINT=true autoreconf --force --install
|
||||||
@ -105,7 +108,7 @@ AUTOPOINT=true autoreconf --force --install
|
|||||||
--enable-dynamic-loading=no \
|
--enable-dynamic-loading=no \
|
||||||
--enable-selinux \
|
--enable-selinux \
|
||||||
--disable-Werror
|
--disable-Werror
|
||||||
make %{?jobs:-j%jobs}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%makeinstall
|
%makeinstall
|
||||||
|
Loading…
x
Reference in New Issue
Block a user