summaryrefslogtreecommitdiffstats
path: root/tools/idevicebackup2.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/idevicebackup2.c')
-rw-r--r--tools/idevicebackup2.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index c822d7f..3b2c0af 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -192,6 +192,20 @@ static int mkdir_with_parents(const char *dir, int mode)
192 return res; 192 return res;
193} 193}
194 194
195#ifdef WIN32
196static int win32err_to_errno(int err_value)
197{
198 switch (err_value) {
199 case ERROR_FILE_NOT_FOUND:
200 return ENOENT;
201 case ERROR_ALREADY_EXISTS:
202 return EEXIST;
203 default:
204 return EFAULT;
205 }
206}
207#endif
208
195static int remove_file(const char* path) 209static int remove_file(const char* path)
196{ 210{
197 int e = 0; 211 int e = 0;
@@ -518,20 +532,6 @@ static int errno_to_device_error(int errno_value)
518 } 532 }
519} 533}
520 534
521#ifdef WIN32
522static int win32err_to_errno(int err_value)
523{
524 switch (err_value) {
525 case ERROR_FILE_NOT_FOUND:
526 return ENOENT;
527 case ERROR_ALREADY_EXISTS:
528 return EEXIST;
529 default:
530 return EFAULT;
531 }
532}
533#endif
534
535static int mb2_handle_send_file(mobilebackup2_client_t mobilebackup2, const char *backup_dir, const char *path, plist_t *errplist) 535static int mb2_handle_send_file(mobilebackup2_client_t mobilebackup2, const char *backup_dir, const char *path, plist_t *errplist)
536{ 536{
537 uint32_t nlen = 0; 537 uint32_t nlen = 0;