Changes by: uvman
Update of /cvs/linux-ntfs/ntfsprogs/libntfs
In directory delta357:/tmp/cvs-serv347/libntfs
Modified Files:
attrib.c dir.c
Log Message:
trace output updates. (Szaka, Yuval)
Index: attrib.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/libntfs/attrib.c,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -p -r1.225 -r1.226
--- attrib.c 26 Oct 2006 19:10:05 -0000 1.225
+++ attrib.c 26 Oct 2006 20:45:28 -0000 1.226
@@ -1625,7 +1625,7 @@ static int ntfs_attr_find(const ATTR_TYP
ntfschar *upcase;
u32 upcase_len;
- ntfs_log_trace("Entering.\n");
+ ntfs_log_trace("Entering for attribute type 0x%x.\n", type);
if (ctx->ntfs_ino) {
vol = ctx->ntfs_ino->vol;
@@ -2461,6 +2461,7 @@ int ntfs_attr_can_be_non_resident(const
return -1;
/* Check the flags and return the result. */
if (ad->flags & ATTR_DEF_RESIDENT) {
+ ntfs_log_trace("Attribute can't be non-resident\n");
errno = EPERM;
return -1;
}
@@ -2497,6 +2498,8 @@ int ntfs_attr_can_be_resident(const ntfs
}
if (type != AT_INDEX_ALLOCATION)
return 0;
+
+ ntfs_log_trace("Attribute can't be resident\n");
errno = EPERM;
return -1;
}
@@ -2543,6 +2546,7 @@ int ntfs_make_room_for_attr(MFT_RECORD *
biu = le32_to_cpu(m->bytes_in_use);
/* Do we have enough space? */
if (biu + size > le32_to_cpu(m->bytes_allocated)) {
+ ntfs_log_trace("Not enough space in the MFT record\n");
errno = ENOSPC;
return -1;
}
@@ -2929,7 +2933,7 @@ int ntfs_attr_record_rm(ntfs_attr_search
ctx->attr, NULL);
if (!al_rl) {
ntfs_log_trace("Couldn't decompress attribute "
- "list runlist. Return success "
+ "list runlist. Succeed "
"anyway.\n");
return 0;
}
@@ -2948,7 +2952,7 @@ int ntfs_attr_record_rm(ntfs_attr_search
* but without extents.
*/
ntfs_log_trace("Couldn't remove attribute list. "
- "Return success anyway.\n");
+ "Succeed anyway.\n");
return 0;
}
}
@@ -3717,8 +3721,9 @@ static int ntfs_resident_attr_resize(ntf
ntfs_inode *ni;
int err;
- ntfs_log_trace("Entering for inode 0x%llx, attr 0x%x.\n", (unsigned long
- long)na->ni->mft_no, na->type);
+ ntfs_log_trace("Entering for inode 0x%llx, attr 0x%x, new size %lld.\n",
+ (unsigned long long)na->ni->mft_no, na->type,
+ (long long)newsize);
/* Get the attribute record that needs modification. */
ctx = ntfs_attr_get_search_ctx(na->ni, NULL);
@@ -4012,6 +4017,7 @@ static int ntfs_attr_make_resident(ntfs_
/* Sanity check the size before we start modifying the attribute. */
if (le32_to_cpu(ctx->mrec->bytes_in_use) - le32_to_cpu(a->length) +
arec_size > le32_to_cpu(ctx->mrec->bytes_allocated)) {
+ ntfs_log_trace("Not enough space to make attribute resident\n");
errno = ENOSPC;
return -1;
}
@@ -4588,8 +4594,9 @@ static int ntfs_non_resident_attr_shrink
s64 nr_freed_clusters;
int err;
- ntfs_log_trace("Entering for inode 0x%llx, attr 0x%x.\n", (unsigned long
- long)na->ni->mft_no, na->type);
+ ntfs_log_trace("Entering for inode 0x%llx, attr 0x%x, newsize %lld.\n",
+ (unsigned long long)na->ni->mft_no, na->type,
+ (long long)newsize);
vol = na->ni->vol;
Index: dir.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/libntfs/dir.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -p -r1.68 -r1.69
--- dir.c 26 Oct 2006 19:10:05 -0000 1.68
+++ dir.c 26 Oct 2006 20:45:28 -0000 1.69
@@ -515,6 +515,8 @@ ntfs_inode *ntfs_pathname_to_inode(ntfs_
return NULL;
}
+ ntfs_log_trace("Path: '%s'\n", pathname);
+
if (parent) {
ni = parent;
} else {
@@ -636,6 +638,8 @@ static int ntfs_filldir(ntfs_inode *dir_
FILE_NAME_ATTR *fn = &ie->key.file_name;
unsigned dt_type;
+ ntfs_log_trace("Entering.\n");
+
/* Advance the position even if going to skip the entry. */
if (index_type == INDEX_TYPE_ALLOCATION)
*pos = (u8*)ie - (u8*)iu.ia + (sle64_to_cpu(
@@ -680,6 +684,8 @@ static MFT_REF ntfs_mft_get_parent_ref(n
FILE_NAME_ATTR *fn;
int eo;
+ ntfs_log_trace("Entering.\n");
+
if (!ni) {
errno = EINVAL;
return ERR_MREF(-1);
@@ -749,6 +755,8 @@ int ntfs_readdir(ntfs_inode *dir_ni, s64
u32 index_block_size, index_vcn_size;
u8 index_block_size_bits, index_vcn_size_bits;
+ ntfs_log_trace("Entering.\n");
+
if (!dir_ni || !pos || !filldir) {
errno = EINVAL;
return -1;
@@ -1119,6 +1127,7 @@ static ntfs_inode *__ntfs_create(ntfs_in
int err, fn_len, si_len, sd_len;
ntfs_log_trace("Entering.\n");
+
/* Sanity checks. */
if (!dir_ni || !name || !name_len) {
ntfs_log_error("Invalid arguments.\n");
@@ -1462,6 +1471,7 @@ int ntfs_delete(ntfs_inode *ni, ntfs_ino
int err = 0;
ntfs_log_trace("Entering.\n");
+
if (!ni || !dir_ni || !name || !name_len) {
ntfs_log_error("Invalid arguments.\n");
errno = EINVAL;
@@ -1694,6 +1704,7 @@ int ntfs_link(ntfs_inode *ni, ntfs_inode
int fn_len, err;
ntfs_log_trace("Entering.\n");
+
if (!ni || !dir_ni || !name || !name_len ||
ni->mft_no == dir_ni->mft_no) {
err = errno;
|