* Fix bug in index.c (see Changelog).
* Minor fixes to attr{ib,list}.c.edge.strict_endians
parent
00c7127551
commit
e48bd91bbf
|
@ -3,7 +3,9 @@ xx/xx/xxxx - 1.12.0-WIP
|
|||
- ntfsls: fix showing not system files started with '$'. (Yura)
|
||||
- Move ntfs2utc and utc2ntfs from utils.[ch] to timeconv.h. (Yura)
|
||||
- Add [acm]time fields to struct ntfs_inode and set them during
|
||||
ntfs_inode_open. Update ntfsmount to use them. (Yura)
|
||||
ntfs_inode_open. Update ntfsmount to use them. (Yura)
|
||||
- index.c::ntfs_index_lookup: fix bug when index context didn't point
|
||||
on index root in which entry located. (Yura)
|
||||
|
||||
20/07/2005 - 1.11.1 - Fix several ntfsmount bugs.
|
||||
|
||||
|
|
|
@ -2858,8 +2858,8 @@ int ntfs_attr_record_rm(ntfs_attr_search_ctx *ctx)
|
|||
* @name_len: name length in unicode characters of the new attribute
|
||||
* @size: size of the new attribute
|
||||
*
|
||||
* If inode haven't got enough space to add attribute, add attribute to one of it
|
||||
* extents, if no extents present or no one of them have enough space, than
|
||||
* If inode haven't got enough space to add attribute, add attribute to one of
|
||||
* it extents, if no extents present or no one of them have enough space, than
|
||||
* allocate new extent and add attribute to it.
|
||||
*
|
||||
* If on one of this steps attribute list is needed but not present, than it is
|
||||
|
@ -4792,20 +4792,7 @@ put_err_out:
|
|||
* attribute is made bigger and the attribute is resident the newly
|
||||
* "allocated" space is cleared and if the attribute is non-resident the
|
||||
* newly allocated space is marked as not initialised and no real allocation
|
||||
* on disk is performed. FIXME: Do we have to create sparse runs or can we just
|
||||
* leave the runlist to finish below data_size, i.e. can we have
|
||||
* allocated_size < data_size? I guess that what we can't and thus we will have
|
||||
* to set the sparse bit of the attribute and create sparse runs to ensure that
|
||||
* allocated_size is >= data_size. We don't need to clear the partial run at
|
||||
* the end of the real allocation because we leave initialized_size low enough.
|
||||
* FIXME: Do we want that? Alternatively, we leave initialized_size = data_size
|
||||
* and do clear the partial run. The latter approach would be more inline with
|
||||
* what windows would do, even though windows wouldn't even make the attribute
|
||||
* sparse, it would just allocate clusters instead. TODO: Check what happens on
|
||||
* WinXP and 2003. FIXME: Make sure to check what NT4 does with an NTFS1.2
|
||||
* volume that has sparse files. I suspect it will blow up so we will need to
|
||||
* perform allocations of clusters, like NT4 would do for NTFS1.2 while we can
|
||||
* use sparse attributes on NTFS3.x.
|
||||
* on disk is performed.
|
||||
*
|
||||
* On success return 0 and on error return -1 with errno set to the error code.
|
||||
* The following error codes are defined:
|
||||
|
|
|
@ -92,6 +92,7 @@ int ntfs_attrlist_need(ntfs_inode *ni)
|
|||
* EINVAL - Invalid arguments passed to function.
|
||||
* ENOMEM - Not enough memory to allocate necessary buffers.
|
||||
* EIO - I/O error occurred or damaged filesystem.
|
||||
* EEXIST - Such attribute already present in attribute list.
|
||||
*/
|
||||
int ntfs_attrlist_entry_add(ntfs_inode *ni, ATTR_RECORD *attr)
|
||||
{
|
||||
|
@ -159,7 +160,7 @@ int ntfs_attrlist_entry_add(ntfs_inode *ni, ATTR_RECORD *attr)
|
|||
continue;
|
||||
if (sle64_to_cpu(ale->lowest_vcn) ==
|
||||
sle64_to_cpu(attr->lowest_vcn)) {
|
||||
err = EINVAL;
|
||||
err = EEXIST;
|
||||
Dprintf("%s(): Attribute with same type, name and "
|
||||
"lowest vcn already present in attribute "
|
||||
"list.\n", __FUNCTION__);
|
||||
|
|
|
@ -53,7 +53,7 @@ ntfs_index_context *ntfs_index_ctx_get(ntfs_inode *ni,
|
|||
*ictx = (ntfs_index_context) {
|
||||
.ni = ni,
|
||||
.name = name,
|
||||
.name_len = name_len
|
||||
.name_len = name_len,
|
||||
};
|
||||
return ictx;
|
||||
}
|
||||
|
@ -88,7 +88,6 @@ void ntfs_index_ctx_put(ntfs_index_context *ictx)
|
|||
}
|
||||
}
|
||||
free(ictx);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -202,6 +201,7 @@ ir_done:
|
|||
ictx->is_in_root = TRUE;
|
||||
ictx->actx = actx;
|
||||
ictx->ia = NULL;
|
||||
ictx->ir = ir;
|
||||
done:
|
||||
ictx->entry = ie;
|
||||
ictx->data = (u8*)ie + offsetof(INDEX_ENTRY, key);
|
||||
|
|
Loading…
Reference in New Issue