diff options
| author | 2014-10-22 20:52:02 +0200 | |
|---|---|---|
| committer | 2014-10-22 22:21:06 +0200 | |
| commit | 57538472cb86d6b376f933e9e416eb769f7c00b7 (patch) | |
| tree | e0cff41e2924c759295526e37d43086db664eb19 /tools/idevicebackup2.c | |
| parent | 067c7c682614fbf0b7aeb13fd8b8ba7dc4fd8bf2 (diff) | |
| download | libimobiledevice-57538472cb86d6b376f933e9e416eb769f7c00b7.tar.gz libimobiledevice-57538472cb86d6b376f933e9e416eb769f7c00b7.tar.bz2 | |
common: Move string_toupper() helper to utils and use it in idevicebackup tools
Diffstat (limited to 'tools/idevicebackup2.c')
| -rw-r--r-- | tools/idevicebackup2.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index 209dfe6..4fe5751 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c | |||
| @@ -157,16 +157,6 @@ static void mobilebackup_afc_get_file_contents(afc_client_t afc, const char *fil | |||
| 157 | afc_file_close(afc, f); | 157 | afc_file_close(afc, f); |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | static char *str_toupper(char* str) | ||
| 161 | { | ||
| 162 | char *res = strdup(str); | ||
| 163 | unsigned int i; | ||
| 164 | for (i = 0; i < strlen(res); i++) { | ||
| 165 | res[i] = toupper(res[i]); | ||
| 166 | } | ||
| 167 | return res; | ||
| 168 | } | ||
| 169 | |||
| 170 | static int __mkdir(const char* path, int mode) | 160 | static int __mkdir(const char* path, int mode) |
| 171 | { | 161 | { |
| 172 | #ifdef WIN32 | 162 | #ifdef WIN32 |
| @@ -273,7 +263,7 @@ static plist_t mobilebackup_factory_info_plist_new(const char* udid, lockdownd_c | |||
| 273 | plist_dict_set_item(ret, "Target Type", plist_new_string("Device")); | 263 | plist_dict_set_item(ret, "Target Type", plist_new_string("Device")); |
| 274 | 264 | ||
| 275 | /* uppercase */ | 265 | /* uppercase */ |
| 276 | udid_uppercase = str_toupper((char*)udid); | 266 | udid_uppercase = string_toupper((char*)udid); |
| 277 | plist_dict_set_item(ret, "Unique Identifier", plist_new_string(udid_uppercase)); | 267 | plist_dict_set_item(ret, "Unique Identifier", plist_new_string(udid_uppercase)); |
| 278 | free(udid_uppercase); | 268 | free(udid_uppercase); |
| 279 | 269 | ||
