mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Revert "xfstests: resolve symlinked devices to real paths"
This reverts commitd5ea873fcbwhich overrode0a818862bbxfstests: support post-udev device mapper node. Signed-off-by: Rich Johnston <rjohnston@sgi.com> Reviewed-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
@@ -220,15 +220,6 @@ else
|
|||||||
known_hosts
|
known_hosts
|
||||||
fi
|
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
|
echo $TEST_DEV | grep -q ":" > /dev/null 2>&1
|
||||||
if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then
|
if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then
|
||||||
echo "common.config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a NFS filesystem"
|
echo "common.config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a NFS filesystem"
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
#include <limits.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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 <filename>\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;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user