From 7712504582eda40d441e90325135993601bab85a Mon Sep 17 00:00:00 2001 From: "cantab.net!aia21" Date: Tue, 4 Nov 2003 13:04:07 +0000 Subject: [PATCH] fix signed warnings 2003/11/03 16:11:36+00:00 cantab.net!aia21 Update what is to do to finish non-resident to resident attribute conversion. (Logical change 1.223) --- libntfs/attrib.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/libntfs/attrib.c b/libntfs/attrib.c index a9a733e6..d5a59730 100644 --- a/libntfs/attrib.c +++ b/libntfs/attrib.c @@ -1986,8 +1986,8 @@ int ntfs_attr_size_bounds_check(const ntfs_volume *vol, const ATTR_TYPES type, if (!ad) return -1; /* We found the attribute. - Do the bounds check. */ - if (size >= le64_to_cpu(ad->min_size) && - size <= le64_to_cpu(ad->max_size)) + if (size >= sle64_to_cpu(ad->min_size) && + size <= sle64_to_cpu(ad->max_size)) return 0; /* @size is out of range! */ errno = ERANGE; @@ -2560,12 +2560,25 @@ static int ntfs_attr_make_resident(ntfs_attr *na, ntfs_attr_search_ctx *ctx) } // FIXME: For now we cheat and assume there is no attribute list - // present. (AIA) + // attribute present. (AIA) if (NInoAttrList(na->ni)) { errno = ENOTSUP; return -1; } + // Is there enough space for the attribute to be resident? + // If not: errno = ENOSPC; return -1; + + // Read and cache runlist if not already done. + + // Convert to resident attribute & resize attribute record. + + // Copy data from run list to resident attribute value. + + // Deallocate clusters from runlist and throw away runlist. + + // Update in-memory struct ntfs_attribute if not done already. + errno = ENOTSUP; return -1;