summaryrefslogtreecommitdiff
path: root/rbutil/ipodpatcher/ipodio-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/ipodpatcher/ipodio-posix.c')
-rw-r--r--rbutil/ipodpatcher/ipodio-posix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rbutil/ipodpatcher/ipodio-posix.c b/rbutil/ipodpatcher/ipodio-posix.c
index 55f0187263..c62e0c8275 100644
--- a/rbutil/ipodpatcher/ipodio-posix.c
+++ b/rbutil/ipodpatcher/ipodio-posix.c
@@ -25,6 +25,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
+#include <errno.h>
#include "ipodio.h"
@@ -105,7 +106,8 @@ int ipod_open(struct ipod_t* ipod, int silent)
ipod->dh=open(ipod->diskname,O_RDONLY);
if (ipod->dh < 0) {
if (!silent) perror(ipod->diskname);
- return -1;
+ if(errno == EACCES) return -2;
+ else return -1;
}
/* Read information about the disk */