From 16a8b97af2d1a4257271208a3b512da884ab4106 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 19 Nov 2020 04:30:01 +0100 Subject: idevicebackup2: Update errno to device error mapping --- tools/idevicebackup2.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index a9450ae..6412fe2 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c @@ -56,6 +56,9 @@ #include #include #define sleep(x) Sleep(x*1000) +#ifndef ELOOP +#define ELOOP 114 +#endif #else #include #include @@ -742,8 +745,18 @@ static int errno_to_device_error(int errno_value) return -6; case EEXIST: return -7; + case ENOTDIR: + return -8; + case EISDIR: + return -9; + case ELOOP: + return -10; + case EIO: + return -11; + case ENOSPC: + return -15; default: - return -errno_value; + return -1; } } -- cgit v1.1-32-gdbae