3
0
forked from pool/util-linux
OBS User unknown 2008-11-07 15:04:55 +00:00 committed by Git OBS Bridge
parent c6a1754ca9
commit 38c0917b17
5 changed files with 68 additions and 19 deletions

View File

@ -0,0 +1,16 @@
Index: util-linux-ng-2.14.1/fdisk/fdisk.c
===================================================================
--- util-linux-ng-2.14.1.orig/fdisk/fdisk.c 2008-11-05 16:38:11.000000000 +0100
+++ util-linux-ng-2.14.1/fdisk/fdisk.c 2008-11-05 17:23:30.000000000 +0100
@@ -1186,8 +1186,9 @@ read_int(unsigned int low, unsigned int
while(isspace(*(line_ptr + suflen)))
*(line_ptr + suflen--) = '\0';
- if ((*line_ptr == 'C' || *line_ptr == 'c') &&
- *(line_ptr + 1) == '\0') {
+ if (((*line_ptr == 'C' || *line_ptr == 'c') &&
+ *(line_ptr + 1) == '\0') ||
+ *line_ptr == '\0') {
/*
* Cylinders
*/

View File

@ -0,0 +1,14 @@
Index: util-linux-ng-2.14.1/mount/lomount.c
===================================================================
--- util-linux-ng-2.14.1.orig/mount/lomount.c 2008-09-10 11:02:43.000000000 +0200
+++ util-linux-ng-2.14.1/mount/lomount.c 2008-11-07 14:00:28.000000000 +0100
@@ -653,7 +653,8 @@ set_loop(const char *device, const char
mode = (*options & SETLOOP_RDONLY) ? O_RDONLY : O_RDWR;
if ((ffd = open(file, mode)) < 0) {
- if (!(*options & SETLOOP_RDONLY) && errno == EROFS)
+ if (!(*options & SETLOOP_RDONLY) &&
+ (errno == EROFS || errno == EACCES))
ffd = open(file, mode = O_RDONLY);
if (ffd < 0) {
perror(file);

View File

@ -1,7 +1,7 @@
Index: util-linux-ng-2.14.1/mount/swapon.c
===================================================================
--- util-linux-ng-2.14.1.orig/mount/swapon.c 2008-09-10 11:02:43.000000000 +0200
+++ util-linux-ng-2.14.1/mount/swapon.c 2008-10-24 14:19:06.000000000 +0200
+++ util-linux-ng-2.14.1/mount/swapon.c 2008-11-07 14:34:30.000000000 +0100
@@ -13,6 +13,8 @@
#include <sys/types.h>
#include <sys/wait.h>
@ -45,7 +45,7 @@ Index: util-linux-ng-2.14.1/mount/swapon.c
int all = 0;
int priority = -1; /* non-prioritized swap by default */
@@ -238,11 +267,114 @@ swap_reinitialize(const char *device) {
@@ -238,11 +267,116 @@ swap_reinitialize(const char *device) {
return -1; /* error */
}
@ -76,10 +76,10 @@ Index: util-linux-ng-2.14.1/mount/swapon.c
+{
+ int fd;
+ char *buf;
+ unsigned int *page, last_page;
+ unsigned int *page, last_page = 0;
+ unsigned int pagesize = 0;
+ off_t size, swap_size;
+ int swap_version;
+ int swap_version = 0;
+ int flip = 0;
+ struct swap_info *s;
+
@ -121,16 +121,18 @@ Index: util-linux-ng-2.14.1/mount/swapon.c
+ }
+ if (pagesize) {
+ s = (struct swap_info *)buf;
+ if (s->version == 1)
+ if (s->version == 1) {
+ swap_version = 1;
+ last_page = s->last_page;
+ else if (bswap_32(s->version) == 1) {
+ } else if (bswap_32(s->version) == 1) {
+ flip = 1;
+ swap_version = 1;
+ last_page = bswap_32(s->last_page);
+ }
+ if (verbose)
+ fprintf(stderr, _("found %sswap v%d signature string"
+ " for %d KiB PAGE_SIZE\n"),
+ flip ? "other-endian " : "", swap_version - 1,
+ flip ? "other-endian " : "", swap_version,
+ pagesize / 1024);
+ swap_size = (last_page + 1) * pagesize;
+ if (swap_size > size) {
@ -160,7 +162,7 @@ Index: util-linux-ng-2.14.1/mount/swapon.c
if (verbose)
printf(_("%s on %s\n"), progname, orig_special);
@@ -260,6 +392,15 @@ do_swapon(const char *orig_special, int
@@ -260,6 +394,15 @@ do_swapon(const char *orig_special, int
return -1;
}
@ -176,7 +178,7 @@ Index: util-linux-ng-2.14.1/mount/swapon.c
/* We have to reinitialize swap with old (=useless) software suspend
* data. The problem is that if we don't do it, then we get data
* corruption the next time an attempt at unsuspending is made.
@@ -268,6 +409,10 @@ do_swapon(const char *orig_special, int
@@ -268,6 +411,10 @@ do_swapon(const char *orig_special, int
fprintf(stdout, _("%s: %s: software suspend data detected. "
"Reinitializing the swap.\n"),
progname, special);

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Nov 7 14:50:00 CET 2008 - mkoenig@suse.de
- fdisk: support +cylinder notation [bnc#441871]
- check for EACCES when using ro fallback when loop mounting
a readonly image
- fix uninitialized variable in swapon pagesize detection
-------------------------------------------------------------------
Mon Oct 27 17:33:01 CET 2008 - mkoenig@suse.de

View File

@ -30,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later
Group: System/Base
AutoReqProv: on
Version: 2.14.1
Release: 5
Release: 6
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
@ -78,6 +78,8 @@ Patch11: util-linux-2.14.1-mount_swap_pagesize.patch
Patch12: util-linux-2.14.1-sys-utils_lscpu_exit.patch
Patch13: util-linux-2.14.1-disk-utils_mkfs.minix_file_size_detection.patch
Patch14: util-linux-2.14.1-fdisk_missing_include.patch
Patch15: util-linux-2.14.1-fdisk_cylinder.patch
Patch16: util-linux-2.14.1-mount_loop_ro_fix.patch
# crypto patch
Patch20: util-linux-mount_losetup_crypto.patch
##
@ -128,6 +130,8 @@ Authors:
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch20 -p1
cp %{SOURCE7} %{SOURCE8} .
#
@ -595,6 +599,11 @@ fi
#%endif
%changelog
* Fri Nov 07 2008 mkoenig@suse.de
- fdisk: support +cylinder notation [bnc#441871]
- check for EACCES when using ro fallback when loop mounting
a readonly image
- fix uninitialized variable in swapon pagesize detection
* Mon Oct 27 2008 mkoenig@suse.de
- fdisk: add missing includes [bnc#438670]
* Thu Oct 23 2008 mkoenig@suse.de
@ -953,7 +962,7 @@ fi
umount -a, resolves #190385
* Mon Jun 12 2006 kay.sievers@suse.de
- use libvolume_id from provided as a rpm by udev 094
* Thu May 18 2006 jeffm@suse.com
* Wed May 17 2006 jeffm@suse.com
- Fixed support for calling external programs w/o -t <type>,
it would add mtab twice [#176582]
* Mon Apr 24 2006 hvogel@suse.de
@ -1047,7 +1056,7 @@ fi
- Don't package manual executable [#114849]
* Thu Sep 01 2005 mmj@suse.de
- Add patch for device-mapper mount by label support [#75966]
* Thu Sep 01 2005 ro@suse.de
* Wed Aug 31 2005 ro@suse.de
- provide and obsolete schedutils
* Tue Aug 23 2005 hvogel@suse.de
- update ionice patch by axboe so that ionice will complain about
@ -1180,7 +1189,7 @@ fi
- Add patch from SGI for fdisk label [#47368]
* Tue Sep 28 2004 mmj@suse.de
- And another one [#46201]
* Thu Sep 16 2004 mmj@suse.de
* Wed Sep 15 2004 mmj@suse.de
- Add patch from Andries to fix cfdisk [#44996]
* Tue Sep 07 2004 mmj@suse.de
- Update to util-linux-2.12c including:
@ -1507,7 +1516,7 @@ fi
o mount updates
* Tue Jul 23 2002 schwab@suse.de
- Fix mkfs.cramfs for architectures with non-4k pages.
* Wed Jul 17 2002 mmj@suse.de
* Tue Jul 16 2002 mmj@suse.de
- Merged base into util-linux
* Mon Jul 15 2002 mmj@suse.de
- Added JFSv2 patch from Christoph Hellwig for volume label. Does
@ -1580,7 +1589,7 @@ fi
- Remove unneeded SPARC patch for hwclock
* Sat Oct 13 2001 kukuk@suse.de
- Update to util-linux 2.11l
* Wed Sep 12 2001 garloff@suse.de
* Tue Sep 11 2001 garloff@suse.de
- Fixed some dutch translations. (bug #10276)
* Mon Sep 10 2001 olh@suse.de
- marry fdisk and AIX label again...
@ -1615,7 +1624,7 @@ fi
- Remove swapdev from filelist
* Tue Jul 10 2001 kukuk@suse.de
- Update to util-linux-2.11g
* Thu Jun 07 2001 bk@suse.de
* Wed Jun 06 2001 bk@suse.de
- added s390x to all ifnarch s390
* Fri Apr 20 2001 kukuk@suse.de
- Fix wall bug (character 80, 160, 240, are missing) [Bug #6962]
@ -1696,7 +1705,7 @@ fi
* Fri Aug 25 2000 pthomas@suse.de
- use %%{_mandir} and %%{_infodir} exclusively. This allows building
from source rpm on platforms other than 7.0.
* Wed Jul 19 2000 bk@suse.de
* Tue Jul 18 2000 bk@suse.de
- s390: removed dasdfmt and silo, %%ifnarch s390 for some non-s390 things.
* Tue May 30 2000 bk@suse.de
- added dasdfmt and silo on s390
@ -1844,14 +1853,14 @@ fi
- changed /local/bin/perl5 in chkdupexe to /usr/bin/perl
* Fri Oct 31 1997 ro@suse.de
- temporarily removed mount-hacker
* Thu Oct 30 1997 florian@suse.de
* Wed Oct 29 1997 florian@suse.de
- add changes from ms@suse.de for hostid.c
* Tue May 20 1997 florian@suse.de
- only support kernel 2.0.x for nfs mounts, please use /bin/mount-hacker
for kernel 2.1.x
* Wed Apr 30 1997 florian@suse.de
- update to mount 2.6g
* Mon Apr 14 1997 florian@suse.de
* Sun Apr 13 1997 florian@suse.de
- update to new version util-linux 2.6
- update to new version mount 2.6e
* Thu Jan 02 1997 florian@suse.de