From: Szabolcs S. <sz...@us...> - 2007-07-13 23:35:14
|
Update of /cvsroot/ntfs-3g/ntfs-3g/libntfs-3g In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17828/libntfs-3g Modified Files: inode.c Log Message: ntfs_inode_free_space(): log all errors Index: inode.c =================================================================== RCS file: /cvsroot/ntfs-3g/ntfs-3g/libntfs-3g/inode.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- inode.c 13 Jul 2007 22:42:35 -0000 1.8 +++ inode.c 13 Jul 2007 23:35:08 -0000 1.9 @@ -978,13 +978,13 @@ int freed, err; if (!ni || size < 0) { - ntfs_log_trace("Invalid arguments.\n"); errno = EINVAL; + ntfs_log_perror("%s: ni=%p size=%d", __FUNCTION__, ni, size); return -1; } - ntfs_log_trace("Entering for inode 0x%llx, size %d.\n", - (long long) ni->mft_no, size); + ntfs_log_trace("Entering for inode %lld, size %d\n", + (unsigned long long)ni->mft_no, size); freed = (le32_to_cpu(ni->mrec->bytes_allocated) - le32_to_cpu(ni->mrec->bytes_in_use)); @@ -1014,7 +1014,7 @@ 0, ctx)) { if (errno != ENOENT) { err = errno; - ntfs_log_trace("Attribute lookup failed.\n"); + ntfs_log_perror("%s: attr lookup failed", __FUNCTION__); goto put_err_out; } if (ctx->attr->type == AT_END) { @@ -1035,7 +1035,7 @@ 0, NULL, 0, ctx)) { err = errno; if (errno != ENOENT) { - ntfs_log_trace("Attribute lookup failed.\n"); + ntfs_log_perror("Attr lookup failed"); } else err = ENOSPC; goto put_err_out; @@ -1047,7 +1047,7 @@ /* Move away attribute. */ if (ntfs_attr_record_move_away(ctx, 0)) { err = errno; - ntfs_log_trace("Failed to move out attribute.\n"); + ntfs_log_perror("Failed to move out attribute"); break; } freed += record_size; @@ -1067,7 +1067,7 @@ NULL, 0, ctx)) { if (errno != ENOENT) { err = errno; - ntfs_log_trace("Attribute lookup failed.\n"); + ntfs_log_perror("Attr lookup #2 failed"); break; } if (ctx->attr->type == AT_END) { |