* %End-Header%
*/
+#include "config.h"
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
return &file->inode;
}
+/* This function returns the inode number from the structure */
+ext2_ino_t ext2fs_file_get_inode_num(ext2_file_t file)
+{
+ if (file->magic != EXT2_ET_MAGIC_EXT2_FILE)
+ return 0;
+ return file->ino;
+}
+
/*
* This function flushes the dirty block buffer out to disk if
* necessary.
return retval;
}
- if (truncate_block <= old_truncate)
+ if (truncate_block >= old_truncate)
return 0;
return ext2fs_punch(file->fs, file->ino, &file->inode, 0,