linux kernel encodes all garbage in filenames by mangle() function. We
need to unmagle() to get the real filenames.
Signed-off-by: Karel Zak <kzak@redhat.com>
umount_LDADD = $(ldadd_common)
swapon_SOURCES = swapon.c swap_constants.h ../lib/linux_version.c \
- ../lib/blkdev.c ../lib/fsprobe.c ../lib/canonicalize.c
+ ../lib/blkdev.c ../lib/fsprobe.c ../lib/canonicalize.c \
+ ../lib/mangle.c
swapon_CFLAGS = $(cflags_common)
swapon_LDADD = $(ldadd_common)
#include "fsprobe.h"
#include "pathnames.h"
#include "swapheader.h"
+#include "mangle.h"
#define PATH_MKSWAP "/sbin/mkswap"
break;
swapFiles = q;
- swapFiles[numSwaps++] = strdup(line);
+ swapFiles[numSwaps++] = unmangle(line);
}
fclose(swaps);
}