From 03b68a52b39ea0fb81b2fd57b67acf81caafc27f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 5 Nov 2011 01:11:15 +0530 Subject: [PATCH] oops --- src/calibre/devices/linux_mount_helper.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/calibre/devices/linux_mount_helper.c b/src/calibre/devices/linux_mount_helper.c index eefbd1ffcc..c7cd54d6b5 100644 --- a/src/calibre/devices/linux_mount_helper.c +++ b/src/calibre/devices/linux_mount_helper.c @@ -238,7 +238,6 @@ int cleanup(const char *dev, const char *mp) { } void check_dev(const char *dev) { - char buffer[PATH_MAX+1]; struct stat file_info; if (dev == NULL || strlen(dev) < strlen(DEV)) { @@ -246,12 +245,7 @@ void check_dev(const char *dev) { exit(EXIT_FAILURE); } - if (realpath(dev, buffer) == NULL) { - fprintf(stderr, "Unable to resolve dev path\n"); - exit(EXIT_FAILURE); - } - - if (strncmp(DEV, buffer, strlen(DEV)) != 0) { + if (strncmp(DEV, dev, strlen(DEV)) != 0) { fprintf(stderr, "Trying to operate on a dev node not under /dev\n"); exit(EXIT_FAILURE); }