summaryrefslogtreecommitdiffstats
path: root/dev/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'dev/main.c')
-rw-r--r--dev/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dev/main.c b/dev/main.c
index babcf67..e4eb686 100644
--- a/dev/main.c
+++ b/dev/main.c
@@ -105,7 +105,7 @@ int main(int argc, char *argv[])
105 if (afc) { 105 if (afc) {
106 perform_syncWillStart(phone, control); 106 perform_syncWillStart(phone, control);
107 107
108 iphone_afc_open_file(afc, "/com.apple.itunes.lock_sync", IPHONE_AFC_FILE_WRITE, &lockfile); 108 iphone_afc_open_file(afc, "/com.apple.itunes.lock_sync", AFC_FOPEN_RW, &lockfile);
109 if (lockfile) { 109 if (lockfile) {
110 printf("locking file\n"); 110 printf("locking file\n");
111 iphone_afc_lock_file(afc, lockfile, 2 | 4); 111 iphone_afc_lock_file(afc, lockfile, 2 | 4);
@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
135 struct stat stbuf; 135 struct stat stbuf;
136 iphone_afc_get_file_attr(afc, "/iTunesOnTheGoPlaylist.plist", &stbuf); 136 iphone_afc_get_file_attr(afc, "/iTunesOnTheGoPlaylist.plist", &stbuf);
137 if (IPHONE_E_SUCCESS == 137 if (IPHONE_E_SUCCESS ==
138 iphone_afc_open_file(afc, "/iTunesOnTheGoPlaylist.plist", IPHONE_AFC_FILE_READ, &my_file) && my_file) { 138 iphone_afc_open_file(afc, "/iTunesOnTheGoPlaylist.plist", AFC_FOPEN_RDONLY, &my_file) && my_file) {
139 printf("A file size: %i\n", (int) stbuf.st_size); 139 printf("A file size: %i\n", (int) stbuf.st_size);
140 char *file_data = (char *) malloc(sizeof(char) * stbuf.st_size); 140 char *file_data = (char *) malloc(sizeof(char) * stbuf.st_size);
141 iphone_afc_read_file(afc, my_file, file_data, stbuf.st_size, &bytes); 141 iphone_afc_read_file(afc, my_file, file_data, stbuf.st_size, &bytes);
@@ -149,7 +149,7 @@ int main(int argc, char *argv[])
149 } else 149 } else
150 printf("couldn't open a file\n"); 150 printf("couldn't open a file\n");
151 151
152 iphone_afc_open_file(afc, "/readme.libiphone.fx", IPHONE_AFC_FILE_WRITE, &my_file); 152 iphone_afc_open_file(afc, "/readme.libiphone.fx", AFC_FOPEN_WR, &my_file);
153 if (my_file) { 153 if (my_file) {
154 char *outdatafile = strdup("this is a bitchin text file\n"); 154 char *outdatafile = strdup("this is a bitchin text file\n");
155 iphone_afc_write_file(afc, my_file, outdatafile, strlen(outdatafile), &bytes); 155 iphone_afc_write_file(afc, my_file, outdatafile, strlen(outdatafile), &bytes);
@@ -175,7 +175,7 @@ int main(int argc, char *argv[])
175 printf("Failure. (expected unless you have a /renme file on your phone)\n"); 175 printf("Failure. (expected unless you have a /renme file on your phone)\n");
176 176
177 printf("Seek & read\n"); 177 printf("Seek & read\n");
178 iphone_afc_open_file(afc, "/readme.libiphone.fx", IPHONE_AFC_FILE_READ, &my_file); 178 iphone_afc_open_file(afc, "/readme.libiphone.fx", AFC_FOPEN_RDONLY, &my_file);
179 if (IPHONE_E_SUCCESS != iphone_afc_seek_file(afc, my_file, 5)) 179 if (IPHONE_E_SUCCESS != iphone_afc_seek_file(afc, my_file, 5))
180 printf("WARN: SEEK DID NOT WORK\n"); 180 printf("WARN: SEEK DID NOT WORK\n");
181 char *threeletterword = (char *) malloc(sizeof(char) * 5); 181 char *threeletterword = (char *) malloc(sizeof(char) * 5);