Subversion Repositories freemyipod

Rev

Rev 784 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 784 Rev 785
Line 253... Line 253...
253
    fi->fh = handle;
253
    fi->fh = handle;
254
    
254
    
255
    return 0;
255
    return 0;
256
}
256
}
257
 
257
 
258
int emcorefs_read(const char* path, char* buf, uint32_t size, off_t offset, struct fuse_file_info* fi) {
258
int emcorefs_read(const char* path, char* buf, size_t size, off_t offset, struct fuse_file_info* fi) {
-
 
259
#ifdef DEBUG2
259
    fprintf(stderr, "FUSE_READ: path=[%s] size=[%d] offset=[%jd] fi->flags=[%d]\n", path, size, offset, fi->flags);
260
    fprintf(stderr, "FUSE_READ: path=[%s] size=[%d] offset=[%jd] fi->flags=[%d]\n", path, size, offset, fi->flags);
260
 
261
#else
-
 
262
    (void)path;
-
 
263
#endif
261
    int res;
264
    int res;
262
    uint32_t emcore_errno_value, addr, nread = size;
265
    uint32_t emcore_errno_value, addr, nread = size;
263
 
266
 
264
    if (!fi->fh)
267
    if (!fi->fh)
265
    {
268
    {
Line 344... Line 347...
344
    }
347
    }
345
    
348
    
346
    return nread;
349
    return nread;
347
}
350
}
348
 
351
 
349
int emcorefs_write(const char* path, const char* buf, uint32_t size, off_t offset, struct fuse_file_info* fi) {
352
int emcorefs_write(const char* path, const char* buf, size_t size, off_t offset, struct fuse_file_info* fi) {
-
 
353
#ifdef DEBUG2
350
    fprintf(stderr, "FUSE_WRITE: path=[%s] size=[%d] offset=[%jd] fi->flags=[%d]\n", path, size, offset, fi->flags);
354
    fprintf(stderr, "FUSE_WRITE: path=[%s] size=[%d] offset=[%jd] fi->flags=[%d]\n", path, size, offset, fi->flags);
351
 
355
#else
-
 
356
    (void)path;
-
 
357
#endif
352
    int res;
358
    int res;
353
    uint32_t emcore_errno_value, addr, nwrite = size;
359
    uint32_t emcore_errno_value, addr, nwrite = size;
354
 
360
 
355
    if (!fi->fh)
361
    if (!fi->fh)
356
    {
362
    {