3
0
forked from pool/util-linux

Accepting request 55969 from Base:System

Accepted submit request 55969 from user puzel

OBS-URL: https://build.opensuse.org/request/show/55969
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=105
This commit is contained in:
Lars Vogdt 2010-12-19 11:40:27 +00:00 committed by Git OBS Bridge
parent dbc9b8a0bd
commit c3d67ddd14
3 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,41 @@
Index: util-linux-ng-2.18/mount/swapon.c
===================================================================
--- util-linux-ng-2.18.orig/mount/swapon.c
+++ util-linux-ng-2.18/mount/swapon.c
@@ -23,6 +23,7 @@
#include "pathnames.h"
#include "swapheader.h"
#include "mangle.h"
+#include "canonicalize.h"
#define PATH_MKSWAP "/sbin/mkswap"
@@ -171,7 +172,11 @@ read_proc_swaps(void) {
break;
swapFiles = q;
- swapFiles[numSwaps++] = unmangle(line);
+ if ((p = unmangle(line)) == NULL)
+ break;
+
+ swapFiles[numSwaps++] = canonicalize_path(p);
+ free(p);
}
fclose(swaps);
}
@@ -179,10 +184,14 @@ read_proc_swaps(void) {
static int
is_in_proc_swaps(const char *fname) {
int i;
+ char *p = canonicalize_path(fname);
for (i = 0; i < numSwaps; i++)
- if (swapFiles[i] && !strcmp(fname, swapFiles[i]))
+ if (swapFiles[i] && !strcmp(p, swapFiles[i])) {
+ free(p);
return 1;
+ }
+ free(p);
return 0;
}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Dec 14 16:11:34 UTC 2010 - puzel@novell.com
- add util-linux-swapon-canonicalize-swap-device.patch
(bnc#641142)
-------------------------------------------------------------------
Thu Dec 2 17:09:08 CET 2010 - mszeredi@suse.cz

View File

@ -30,7 +30,7 @@ BuildRequires: pam-devel
BuildRequires: pkg-config
BuildRequires: readline-devel
BuildRequires: zlib-devel
Url: http://userweb.kernel.org/~kzak/util-linux-ng/
Url: http://kernel.org/~kzak/util-linux/
Supplements: filesystem(minix)
Provides: fsck-with-dev-lock = %{version}
# bnc#651598:
@ -85,6 +85,7 @@ Patch7: util-linux-swapon-btrfs-limitations
Patch8: util-linux-agetty-s-option.patch
Patch9: util-linux-fsck-l-option.patch
Patch10: util-linux-2.18-no-canonicalize-fix.patch
Patch11: util-linux-swapon-canonicalize-swap-device.patch
##
## adjtimex
##
@ -194,6 +195,8 @@ Files to develop applications using the libmount library.
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
#
cd adjtimex-*
# adjtimex patches belongs here