From 59407ac0ffd3cb57170a7028889050c810bb6d1c Mon Sep 17 00:00:00 2001 From: "(none)!yura" <(none)!yura> Date: Thu, 7 Oct 2004 16:40:29 +0000 Subject: [PATCH] fix some stupid bugs (Logical change 1.593) --- libntfs/attrib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libntfs/attrib.c b/libntfs/attrib.c index c231e31c..6241387a 100644 --- a/libntfs/attrib.c +++ b/libntfs/attrib.c @@ -3751,7 +3751,8 @@ static int ntfs_non_resident_attr_shrink(ntfs_attr *na, const s64 newsize) "failed. Aborting...\n", __FUNCTION__); } else if (err == ENOENT) err = EIO; - goto put_err_out; + errno = err; + return -1; } /* The first cluster outside the new allocation. */ @@ -3986,6 +3987,7 @@ static int ntfs_non_resident_attr_expand(ntfs_attr *na, const s64 newsize) ctx = ntfs_attr_get_search_ctx(na->ni, NULL); if (!ctx) { + err = errno; if ((na->allocated_size >> vol->cluster_size_bits) != first_free_vcn) goto rollback;