X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=second%2Ffs_ext2.c;h=41a3c79cce2096ac513e9135ccb677b072a67f4f;hb=e915b0ad8c6b5a2fa25c59bd56ae752f8c2c799d;hp=a85958f0323f54e4d73c00ce158d8bc70208f8d1;hpb=37d30b56405bf9858e0c1c1baad93105737e7a1b;p=yaboot.git diff --git a/second/fs_ext2.c b/second/fs_ext2.c index a85958f..41a3c79 100644 --- a/second/fs_ext2.c +++ b/second/fs_ext2.c @@ -54,7 +54,7 @@ static int ext2_read( struct boot_file_t* file, static int ext2_seek( struct boot_file_t* file, unsigned int newpos); static int ext2_close( struct boot_file_t* file); -static unsigned int ext2_ino_size(struct boot_file_t *file); +static int ext2_ino_size(struct boot_file_t *file, unsigned int *size); struct fs_t ext2_filesystem = { @@ -567,14 +567,15 @@ ext2_close( struct boot_file_t* file) return 0; } -static unsigned int ext2_ino_size(struct boot_file_t *file) +static int ext2_ino_size(struct boot_file_t *file, unsigned int *size) { struct ext2_inode ei; if (ext2fs_read_inode(fs, file->inode, &ei)) - return 0; + return FILE_IOERR; - return ei.i_size; + *size = ei.i_size; + return FILE_ERR_OK; } static errcode_t linux_open (const char *name, int flags, io_channel * channel)