This commit is contained in:
parent
007e8143af
commit
e4c3fe11e6
19
util-linux-2.13.1-fdisk_cfdisk_yesno.patch
Normal file
19
util-linux-2.13.1-fdisk_cfdisk_yesno.patch
Normal file
@ -0,0 +1,19 @@
|
||||
Index: util-linux-ng-2.13.1/fdisk/cfdisk.c
|
||||
===================================================================
|
||||
--- util-linux-ng-2.13.1.orig/fdisk/cfdisk.c
|
||||
+++ util-linux-ng-2.13.1/fdisk/cfdisk.c
|
||||
@@ -1869,10 +1869,12 @@ write_part_table(void) {
|
||||
clear_warning();
|
||||
if (len == GS_ESCAPE)
|
||||
return;
|
||||
- else if (strcasecmp(response, _("no")) == 0) {
|
||||
+ else if (strcasecmp(response, _("no")) == 0 ||
|
||||
+ strcasecmp(response, "no") == 0) {
|
||||
print_warning(_("Did not write partition table to disk"));
|
||||
return;
|
||||
- } else if (strcasecmp(response, _("yes")) == 0)
|
||||
+ } else if (strcasecmp(response, _("yes")) == 0 ||
|
||||
+ strcasecmp(response, "yes") == 0)
|
||||
done = TRUE;
|
||||
else
|
||||
print_warning(_("Please enter `yes' or `no'"));
|
@ -1,24 +0,0 @@
|
||||
Index: util-linux-ng-2.13.1/mount/fstab.c
|
||||
===================================================================
|
||||
--- util-linux-ng-2.13.1.orig/mount/fstab.c
|
||||
+++ util-linux-ng-2.13.1/mount/fstab.c
|
||||
@@ -419,11 +419,17 @@ getfs_by_spec (const char *spec) {
|
||||
struct mntentchn *
|
||||
getfs_by_devname (const char *devname) {
|
||||
struct mntentchn *mc, *mc0;
|
||||
+ char *name;
|
||||
|
||||
mc0 = fstab_head();
|
||||
- for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
|
||||
- if (streq(mc->m.mnt_fsname, devname))
|
||||
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
|
||||
+ name = canonicalize(mc->m.mnt_fsname);
|
||||
+ if (streq(name, devname)) {
|
||||
+ free(name);
|
||||
return mc;
|
||||
+ }
|
||||
+ free(name);
|
||||
+ }
|
||||
return NULL;
|
||||
}
|
||||
|
86
util-linux-2.13.1-mount_getfs_fix.patch
Normal file
86
util-linux-2.13.1-mount_getfs_fix.patch
Normal file
@ -0,0 +1,86 @@
|
||||
X-Gnus-Coding-System: -*- coding: utf-8; -*-
|
||||
|
||||
On Mon, Feb 11, 2008 at 05:04:22PM +0100, Matthias Koenig wrote:
|
||||
> Matthias Koenig <mkoenig@suse.de> writes:
|
||||
>
|
||||
> > Fixes a problem when you define a device via a persistent
|
||||
> > udev device name in /etc/fstab but use the real block device
|
||||
> > name on mount invocation.
|
||||
|
||||
I didn't test it, but according to the code (and code never lies:-)
|
||||
you're right.
|
||||
|
||||
> > mc0 = fstab_head();
|
||||
> > - for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
|
||||
> > - if (streq(mc->m.mnt_fsname, devname))
|
||||
> > + for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
|
||||
> > + name = canonicalize(mc->m.mnt_fsname);
|
||||
> > + if (streq(name, devname)) {
|
||||
> > + free(name);
|
||||
> > return mc;
|
||||
> > + }
|
||||
> > + free(name);
|
||||
> > + }
|
||||
> > return NULL;
|
||||
> > }
|
||||
|
||||
We can't simply canonicalize only. We have to support non-canonicalized
|
||||
(/dev/cdrom, ...) versions too. And there shouldn't be a performance
|
||||
penalization for people who use canonical paths in their fstab.
|
||||
|
||||
> I am dumb, please ignore this patch.
|
||||
> New patch will follow.
|
||||
|
||||
No problem. Please, test the patch below.
|
||||
|
||||
Karel
|
||||
|
||||
>From a3c6d618c332ed3651fef629739ac246fd31b7ca Mon Sep 17 00:00:00 2001
|
||||
From: Karel Zak <kzak@redhat.com>
|
||||
Date: Fri, 15 Feb 2008 01:56:18 +0100
|
||||
Subject: [PATCH] mount: use canonicalize in getfs_by_devname
|
||||
|
||||
Fixes a problem when you define a device via a persistent
|
||||
udev device name in /etc/fstab but use the real block device
|
||||
name on mount invocation.
|
||||
|
||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||
---
|
||||
mount/fstab.c | 13 +++++++++++++
|
||||
1 files changed, 13 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/mount/fstab.c b/mount/fstab.c
|
||||
index 814e6fc..ada8d32 100644
|
||||
--- a/mount/fstab.c
|
||||
+++ b/mount/fstab.c
|
||||
@@ -425,9 +425,22 @@ getfs_by_devname (const char *devname) {
|
||||
struct mntentchn *mc, *mc0;
|
||||
|
||||
mc0 = fstab_head();
|
||||
+
|
||||
+ /* canonical devname in fstab */
|
||||
for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
|
||||
if (streq(mc->m.mnt_fsname, devname))
|
||||
return mc;
|
||||
+
|
||||
+ /* noncanonical devname in fstab */
|
||||
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
|
||||
+ char *fs = canonicalize(mc->m.mnt_fsname);
|
||||
+ if (streq(fs, devname)) {
|
||||
+ free(fs);
|
||||
+ return mc;
|
||||
+ }
|
||||
+ free(fs);
|
||||
+ }
|
||||
+
|
||||
return NULL;
|
||||
}
|
||||
|
||||
--
|
||||
1.5.3.8
|
||||
|
||||
-
|
||||
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
|
||||
the body of a message to majordomo@vger.kernel.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 3 17:11:53 CEST 2008 - mkoenig@suse.de
|
||||
|
||||
- cfdisk: accept english answer [bnc#369043]
|
||||
- use upstream getfs fix
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 26 22:05:42 CET 2008 - coolo@suse.de
|
||||
|
||||
|
@ -22,7 +22,7 @@ License: BSD 3-Clause; GPL v2 or later
|
||||
Group: System/Base
|
||||
AutoReqProv: on
|
||||
Version: 2.13.1
|
||||
Release: 17
|
||||
Release: 19
|
||||
Requires: %name-lang = %{version}
|
||||
Summary: A collection of basic system utilities
|
||||
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2
|
||||
@ -67,10 +67,12 @@ Patch8: util-linux-2.13.1-canonicalize_loopfile_name.patch
|
||||
Patch9: util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch
|
||||
Patch10: util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch
|
||||
Patch11: util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch
|
||||
#
|
||||
Patch12: util-linux-2.13.1-getfs_fix.patch
|
||||
Patch12: util-linux-2.13.1-mount_getfs_fix.patch
|
||||
# 254437 - swapon should automatically reset the suspend signature
|
||||
Patch13: util-linux-ng-2.13-swapon-swsuspend.patch
|
||||
#
|
||||
Patch14: util-linux-2.13.1-fdisk_cfdisk_yesno.patch
|
||||
# crypto patch
|
||||
Patch20: util-linux-mount_losetup_crypto.patch
|
||||
##
|
||||
##
|
||||
@ -119,6 +121,7 @@ Authors:
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch20 -p1
|
||||
#%patch38 -p1
|
||||
#
|
||||
@ -571,7 +574,10 @@ fi
|
||||
#%endif
|
||||
|
||||
%changelog
|
||||
* Wed Mar 26 2008 coolo@suse.de
|
||||
* Thu Apr 03 2008 mkoenig@suse.de
|
||||
- cfdisk: accept english answer [bnc#369043]
|
||||
- use upstream getfs fix
|
||||
* Thu Mar 27 2008 coolo@suse.de
|
||||
- actually require the split out package
|
||||
* Sun Mar 23 2008 coolo@suse.de
|
||||
- splitting out 60%% of the size of the package:
|
||||
@ -627,7 +633,7 @@ fi
|
||||
- merged upstream:
|
||||
util-linux-2.13-mount_helper_fix.patch
|
||||
util-linux-2.13-hwclock_rtc_option.patch
|
||||
* Thu Oct 04 2007 bg@suse.de
|
||||
* Fri Oct 05 2007 bg@suse.de
|
||||
- don't use parisc, parisc32 and parisc64.
|
||||
* Mon Oct 01 2007 mkoenig@suse.de
|
||||
- update to version 2.13
|
||||
@ -1293,7 +1299,7 @@ fi
|
||||
- The install_info macros need PreReq: %%install_info_prereq
|
||||
* Fri Feb 07 2003 ro@suse.de
|
||||
- added install_info macros
|
||||
* Tue Feb 04 2003 ro@suse.de
|
||||
* Wed Feb 05 2003 ro@suse.de
|
||||
- don't package /bin/kill (part of coreutils now)
|
||||
* Tue Feb 04 2003 meissner@suse.de
|
||||
- Include tarball with pmac-utils manpages, so we do not need
|
||||
@ -1710,7 +1716,7 @@ fi
|
||||
- rdev is not built on alpha
|
||||
* Mon Jan 18 1999 florian@suse.de
|
||||
- fixed one broken case to delete a partition in fdisk
|
||||
* Sun Dec 13 1998 bs@suse.de
|
||||
* Mon Dec 14 1998 bs@suse.de
|
||||
- fixed file list
|
||||
* Thu Dec 10 1998 fehr@suse.de
|
||||
- fix bug in fdisk
|
||||
|
Loading…
Reference in New Issue
Block a user