summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matt Colyer2008-08-18 08:55:44 -0700
committerGravatar Matt Colyer2008-08-18 08:55:44 -0700
commitbc6f309b2bd341e04d2a1a9cc2c035f2dd44e0e7 (patch)
treec86e49447b8baf5fd22d6ee114411505489bc3a2
parent951d5ca00c2fc26231c2766939e1971febdbd7d9 (diff)
downloadlibimobiledevice-bc6f309b2bd341e04d2a1a9cc2c035f2dd44e0e7.tar.gz
libimobiledevice-bc6f309b2bd341e04d2a1a9cc2c035f2dd44e0e7.tar.bz2
Exposed file block information in iFuse.
-rw-r--r--src/AFC.c1
-rw-r--r--src/ifuse.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/AFC.c b/src/AFC.c
index 19d8ae5..3ad31d2 100644
--- a/src/AFC.c
+++ b/src/AFC.c
@@ -547,7 +547,6 @@ AFCFile *afc_get_file_info(AFClient *client, const char *path) {
my_file->size = atoi(list[i+1]);
}
-
if (!strcmp(list[i], "st_blocks")) {
my_file->blocks = atoi(list[i+1]);
}
diff --git a/src/ifuse.c b/src/ifuse.c
index 4967112..f6b9c72 100644
--- a/src/ifuse.c
+++ b/src/ifuse.c
@@ -55,6 +55,8 @@ static int ifuse_getattr(const char *path, struct stat *stbuf) {
} else {
stbuf->st_mode = file->type | 0644; // but we don't want anything on the iPhone executable, like, ever
stbuf->st_size = file->size;
+ stbuf->st_blksize = 2048; // FIXME: Is this the actual block size used on the iPhone?
+ stbuf->st_blocks = file->blocks;
}
return res;