Changeset 43a9968 in mainline
- Timestamp:
- 2011-11-08T08:07:02Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e31e56a1
- Parents:
- 12b4a7f
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_inode.c
r12b4a7f r43a9968 193 193 } 194 194 195 bool ext4_inode_can_truncate(ext4_ inode_t *inode)195 bool ext4_inode_can_truncate(ext4_superblock_t *sb, ext4_inode_t *inode) 196 196 { 197 197 if (ext4_inode_has_flag(inode, EXT4_INODE_FLAG_APPEND) … … 201 201 202 202 203 if (ext4_inode_get_mode( inode) == EXT4_INODE_MODE_FILE204 || ext4_inode_get_mode( inode) == EXT4_INODE_MODE_DIRECTORY) {203 if (ext4_inode_get_mode(sb, inode) == EXT4_INODE_MODE_FILE 204 || ext4_inode_get_mode(sb, inode) == EXT4_INODE_MODE_DIRECTORY) { 205 205 return true; 206 206 } -
uspace/lib/ext4/libext4_inode.h
r12b4a7f r43a9968 187 187 extern ext4_extent_header_t * ext4_inode_get_extent_header(ext4_inode_t *); 188 188 extern bool ext4_inode_has_flag(ext4_inode_t *, uint32_t); 189 extern bool ext4_inode_can_truncate(ext4_ inode_t *);189 extern bool ext4_inode_can_truncate(ext4_superblock_t *, ext4_inode_t *); 190 190 191 191 #endif -
uspace/srv/fs/ext4fs/ext4fs_ops.c
r12b4a7f r43a9968 955 955 956 956 957 if (! ext4_inode_can_truncate( inode_ref->inode)) {957 if (! ext4_inode_can_truncate(fs->superblock, inode_ref->inode)) { 958 958 // Unable to truncate 959 959 return EINVAL;
Note:
See TracChangeset
for help on using the changeset viewer.