diff options
Diffstat (limited to 'src/ifuse.c')
| -rw-r--r-- | src/ifuse.c | 20 |
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 @@ | |||
| 42 | GHashTable *file_handles; | 42 | GHashTable *file_handles; |
| 43 | int fh_index = 0; | 43 | int fh_index = 0; |
| 44 | 44 | ||
| 45 | iPhone *phone = NULL; | 45 | iphone_device_t phone = NULL; |
| 46 | lockdownd_client *control = NULL; | 46 | iphone_lckd_client_t control = NULL; |
| 47 | 47 | ||
| 48 | int debug = 0; | 48 | int 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 | ||
