diff options
author | Karel Zak | 2008-03-20 14:45:33 +0100 |
---|---|---|
committer | Karel Zak | 2008-03-20 14:45:33 +0100 |
commit | 07d9b366e4cad566d26780647cb081b07fae6416 (patch) | |
tree | 8d32aa156f8a3e6684ed71ca3e2fff4a91c33ea1 /mount/swapon.c | |
parent | swapon: Reinitialize software suspend areas to avoid future corruption. (diff) | |
download | kernel-qcow2-util-linux-07d9b366e4cad566d26780647cb081b07fae6416.tar.gz kernel-qcow2-util-linux-07d9b366e4cad566d26780647cb081b07fae6416.tar.xz kernel-qcow2-util-linux-07d9b366e4cad566d26780647cb081b07fae6416.zip |
swapon: remove unnecessary myrealpath() call
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/swapon.c')
-rw-r--r-- | mount/swapon.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/mount/swapon.c b/mount/swapon.c index 6fce6fd62..33d2b135f 100644 --- a/mount/swapon.c +++ b/mount/swapon.c @@ -144,17 +144,9 @@ read_proc_swaps(void) { static int is_in_proc_swaps(const char *fname) { int i; - char canonical[PATH_MAX + 2]; - - if (!myrealpath(fname, canonical, PATH_MAX + 1)) { - fprintf(stderr, _("%s: cannot canonicalize %s: %s\n"), - progname, fname, strerror(errno)); - strncpy(canonical, fname, PATH_MAX + 1); - *(canonical + (PATH_MAX + 1)) = '\0'; - } for (i = 0; i < numSwaps; i++) - if (swapFiles[i] && !strcmp(canonical, swapFiles[i])) + if (swapFiles[i] && !strcmp(fname, swapFiles[i])) return 1; return 0; } |