From 7b2806e2e86f05c29296280b8866bd62e382e889 Mon Sep 17 00:00:00 2001 From: Rich Johnston Date: Wed, 28 Nov 2012 09:02:10 -0600 Subject: [PATCH] Revert "xfstests: resolve symlinked devices to real paths" This reverts commit d5ea873fcbf00b841f0511a26fb341364a5c6425 which overrode 0a818862bb74932e15971ec8bedb55765ec3a3f6 xfstests: support post-udev device mapper node. Signed-off-by: Rich Johnston Reviewed-by: Rich Johnston --- common.config | 9 --------- src/realpath.c | 32 -------------------------------- 2 files changed, 41 deletions(-) delete mode 100644 src/realpath.c diff --git a/common.config b/common.config index 585b1505..57f505de 100644 --- a/common.config +++ b/common.config @@ -220,15 +220,6 @@ else known_hosts fi -# Scripts just don't deal well with symlinked devices -if [ -L $TEST_DEV ]; then - TEST_DEV=`src/realpath $TEST_DEV` -fi - -if [ -L $SCRATCH_DEV ]; then - SCRATCH_DEV=`src/realpath $SCRATCH_DEV` -fi - echo $TEST_DEV | grep -q ":" > /dev/null 2>&1 if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then echo "common.config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a NFS filesystem" diff --git a/src/realpath.c b/src/realpath.c deleted file mode 100644 index 997b1aa9..00000000 --- a/src/realpath.c +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include -#include - -/* - * Simple wrapper around realpath(3) to get absolute path - * to a device name; many xfstests scripts don't cope well - * with symlinked devices due to differences in /proc/mounts, - * /etc/mtab, mount output, etc. - */ - -int main(int argc, char *argv[]) -{ - char path[PATH_MAX]; - char resolved_path[PATH_MAX]; - - if (argc != 2) { - printf("Usage: %s \n", argv[0]); - return 1; - } - - strncpy(path, argv[1], PATH_MAX-1); - - if (!realpath(path, resolved_path)) { - perror("Failed to resolve path for %s"); - return 1; - } - - printf("%s\n", resolved_path); - return 0; -} -- 2.39.5