summaryrefslogtreecommitdiffstats
path: root/src/ifuse.c
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-08-25 23:25:56 +0200
committerGravatar Jonathan Beck2008-08-31 19:32:27 +0200
commit6ac4ceb4c6ee63c279f4841381a3eb09598f3517 (patch)
tree37de86e9d99a56c2e4ef1e7b5db28bd252cd4a39 /src/ifuse.c
parentc042f7ca2731fa5c8a5aa13789f5901ae5a3af7a (diff)
downloadlibimobiledevice-6ac4ceb4c6ee63c279f4841381a3eb09598f3517.tar.gz
libimobiledevice-6ac4ceb4c6ee63c279f4841381a3eb09598f3517.tar.bz2
migrate main.c
Diffstat (limited to 'src/ifuse.c')
-rw-r--r--src/ifuse.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/ifuse.c b/src/ifuse.c
index 7672bb9..cc2072f 100644
--- a/src/ifuse.c
+++ b/src/ifuse.c
@@ -42,8 +42,8 @@
42GHashTable *file_handles; 42GHashTable *file_handles;
43int fh_index = 0; 43int fh_index = 0;
44 44
45iPhone *phone = NULL; 45iphone_device_t phone = NULL;
46lockdownd_client *control = NULL; 46iphone_lckd_client_t control = NULL;
47 47
48int debug = 0; 48int debug = 0;
49 49
@@ -52,22 +52,6 @@ static int ifuse_getattr(const char *path, struct stat *stbuf) {
52 AFCFile *file; 52 AFCFile *file;
53 AFClient *afc = fuse_get_context()->private_data; 53 AFClient *afc = fuse_get_context()->private_data;
54 54
55 memset(stbuf, 0, sizeof(struct stat));
56 file = afc_get_file_info(afc, path);
57 if (!file){
58 res = -ENOENT;
59 } else {
60 stbuf->st_mode = file->type | (S_ISDIR(file->type) ? 0755 : 0644);
61 stbuf->st_size = file->size;
62 stbuf->st_blksize = 2048; // FIXME: Is this the actual block size used on the iPhone?
63 stbuf->st_blocks = file->blocks;
64 stbuf->st_uid = getuid();
65 stbuf->st_gid = getgid();
66
67 afc_close_file(afc,file);
68 free(file);
69 }
70
71 return res; 55 return res;
72} 56}
73 57