From c3c4d9080b48842b3f226938a2930c5bd852d2e2 Mon Sep 17 00:00:00 2001 From: szaka Date: Tue, 3 Mar 2009 18:55:34 +0000 Subject: [PATCH] ntfs_attr_map_whole_runlist: cleanup, tabulated logging --- libntfs-3g/attrib.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/libntfs-3g/attrib.c b/libntfs-3g/attrib.c index 0d42b55a..80a9e782 100644 --- a/libntfs-3g/attrib.c +++ b/libntfs-3g/attrib.c @@ -561,14 +561,14 @@ int ntfs_attr_map_whole_runlist(ntfs_attr *na) ntfs_attr_search_ctx *ctx; ntfs_volume *vol = na->ni->vol; ATTR_RECORD *a; - int err; + int ret = -1; - ntfs_log_trace("Entering for inode 0x%llx, attr 0x%x.\n", - (unsigned long long)na->ni->mft_no, na->type); + ntfs_log_enter("Entering for inode %llu, attr 0x%x.\n", + (unsigned long long)na->ni->mft_no, na->type); ctx = ntfs_attr_get_search_ctx(na->ni, NULL); if (!ctx) - return -1; + goto out; /* Map all attribute extents one by one. */ next_vcn = last_vcn = highest_vcn = 0; @@ -639,17 +639,13 @@ int ntfs_attr_map_whole_runlist(ntfs_attr *na) (long long)highest_vcn, (long long)last_vcn); goto err_out; } - err = errno; + if (errno == ENOENT) + ret = 0; +err_out: ntfs_attr_put_search_ctx(ctx); - if (err == ENOENT) - return 0; -out_now: - errno = err; - return -1; -err_out: - err = errno; - ntfs_attr_put_search_ctx(ctx); - goto out_now; +out: + ntfs_log_leave("\n"); + return ret; } /**