diff options
| author | 2020-11-19 04:30:01 +0100 | |
|---|---|---|
| committer | 2020-11-19 04:30:01 +0100 | |
| commit | 16a8b97af2d1a4257271208a3b512da884ab4106 (patch) | |
| tree | dd0985558c00cead8c21c3c59cd270277552fd5e /tools | |
| parent | a8a6c64b4d135e3c8c0411b2571f7bf65d724d8b (diff) | |
| download | libimobiledevice-16a8b97af2d1a4257271208a3b512da884ab4106.tar.gz libimobiledevice-16a8b97af2d1a4257271208a3b512da884ab4106.tar.bz2 | |
idevicebackup2: Update errno to device error mapping
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/idevicebackup2.c | 15 |
1 files changed, 14 insertions, 1 deletions
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 @@ | |||
| 56 | #include <windows.h> | 56 | #include <windows.h> |
| 57 | #include <conio.h> | 57 | #include <conio.h> |
| 58 | #define sleep(x) Sleep(x*1000) | 58 | #define sleep(x) Sleep(x*1000) |
| 59 | #ifndef ELOOP | ||
| 60 | #define ELOOP 114 | ||
| 61 | #endif | ||
| 59 | #else | 62 | #else |
| 60 | #include <termios.h> | 63 | #include <termios.h> |
| 61 | #include <sys/statvfs.h> | 64 | #include <sys/statvfs.h> |
| @@ -742,8 +745,18 @@ static int errno_to_device_error(int errno_value) | |||
| 742 | return -6; | 745 | return -6; |
| 743 | case EEXIST: | 746 | case EEXIST: |
| 744 | return -7; | 747 | return -7; |
| 748 | case ENOTDIR: | ||
| 749 | return -8; | ||
| 750 | case EISDIR: | ||
| 751 | return -9; | ||
| 752 | case ELOOP: | ||
| 753 | return -10; | ||
| 754 | case EIO: | ||
| 755 | return -11; | ||
| 756 | case ENOSPC: | ||
| 757 | return -15; | ||
| 745 | default: | 758 | default: |
| 746 | return -errno_value; | 759 | return -1; |
| 747 | } | 760 | } |
| 748 | } | 761 | } |
| 749 | 762 | ||
