summaryrefslogtreecommitdiffstats
path: root/rbutil/ipodpatcher/ipodio-win32.c
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2008-05-04 11:59:04 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2008-05-04 11:59:04 +0000
commit194b2ca887f44e6c3e0244e7f4733060e7aa1618 (patch)
treed74a7230e663e06fbd3b3b3830f4a7c3ceafc43e /rbutil/ipodpatcher/ipodio-win32.c
parentdaa8341a13ddc93981d2c2178b183a13b5e08950 (diff)
downloadrockbox-194b2ca887f44e6c3e0244e7f4733060e7aa1618.tar.gz
rockbox-194b2ca887f44e6c3e0244e7f4733060e7aa1618.tar.bz2
rockbox-194b2ca887f44e6c3e0244e7f4733060e7aa1618.zip
Check for permission denied error when trying to access the player and inform the user that raw disc access permissions are required.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17351 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/ipodpatcher/ipodio-win32.c')
-rw-r--r--rbutil/ipodpatcher/ipodio-win32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/rbutil/ipodpatcher/ipodio-win32.c b/rbutil/ipodpatcher/ipodio-win32.c
index 2f75153c3a..985ec4ec4b 100644
--- a/rbutil/ipodpatcher/ipodio-win32.c
+++ b/rbutil/ipodpatcher/ipodio-win32.c
@@ -78,7 +78,10 @@ int ipod_open(struct ipod_t* ipod, int silent)
if (ipod->dh == INVALID_HANDLE_VALUE) {
if (!silent) print_error(" Error opening disk: ");
- return -1;
+ if(GetLastError() == ERROR_ACCESS_DENIED)
+ return -2;
+ else
+ return -1;
}
if (!lock_volume(ipod->dh)) {