Commit bc6f309b authored by Matt Colyer's avatar Matt Colyer

Exposed file block information in iFuse.

parent 951d5ca0
...@@ -547,7 +547,6 @@ AFCFile *afc_get_file_info(AFClient *client, const char *path) { ...@@ -547,7 +547,6 @@ AFCFile *afc_get_file_info(AFClient *client, const char *path) {
my_file->size = atoi(list[i+1]); my_file->size = atoi(list[i+1]);
} }
if (!strcmp(list[i], "st_blocks")) { if (!strcmp(list[i], "st_blocks")) {
my_file->blocks = atoi(list[i+1]); my_file->blocks = atoi(list[i+1]);
} }
......
...@@ -55,6 +55,8 @@ static int ifuse_getattr(const char *path, struct stat *stbuf) { ...@@ -55,6 +55,8 @@ static int ifuse_getattr(const char *path, struct stat *stbuf) {
} else { } else {
stbuf->st_mode = file->type | 0644; // but we don't want anything on the iPhone executable, like, ever 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_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; return res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment