| Changes by: cha0smaster
Update of /cvsroot/linux-ntfs/ntfsprogs/libntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13660/libntfs
Modified Files:
	attrib.c dir.c index.c 
Log Message:
cleanups 
Index: attrib.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/attrib.c,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -p -r1.205 -r1.206
--- attrib.c	19 Feb 2006 00:36:23 -0000	1.205
+++ attrib.c	19 Feb 2006 00:37:15 -0000	1.206
@@ -4480,7 +4480,7 @@ retry:
 		}
 		a->highest_vcn = cpu_to_sle64(stop_vcn - 1);
 		ntfs_inode_mark_dirty(ni);
-		/* All mapping pairs are writed. */
+		/* All mapping pairs has been written. */
 		if (!err)
 			break;
 	}
Index: dir.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/dir.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -p -r1.54 -r1.55
--- dir.c	10 Feb 2006 11:00:47 -0000	1.54
+++ dir.c	19 Feb 2006 00:37:15 -0000	1.55
@@ -1119,12 +1119,16 @@ static ntfs_inode *__ntfs_create(ntfs_in
 	/* Sanity checks. */
 	if (!dir_ni || !name || !name_len) {
 		ntfs_log_error("Invalid arguments.\n");
+		errno = EINVAL;
 		return NULL;
 	}
 	/* Allocate MFT record for new file. */
 	ni = ntfs_mft_record_alloc(dir_ni->vol, NULL);
 	if (!ni) {
-		ntfs_log_error("Failed to allocate new MFT record.\n");
+		err = errno;
+		ntfs_log_error("Failed to allocate new MFT record: %s.\n",
+				strerror(err));
+		errno = err;
 		return NULL;
 	}
 	/*
@@ -1150,7 +1154,8 @@ static ntfs_inode *__ntfs_create(ntfs_in
 	if (ntfs_attr_add(ni, AT_STANDARD_INFORMATION, AT_UNNAMED, 0,
 			(u8*)si, si_len)) {
 		err = errno;
-		ntfs_log_error("Failed to add STANDARD_INFORMATION attribute.\n");
+		ntfs_log_error("Failed to add STANDARD_INFORMATION "
+				"attribute.\n");
 		goto err_out;
 	}
 	if (S_ISDIR(type)) {
@@ -1280,7 +1285,8 @@ static ntfs_inode *__ntfs_create(ntfs_in
 	if (ntfs_index_add_filename(dir_ni, fn, MK_MREF(ni->mft_no,
 			le16_to_cpu(ni->mrec->sequence_number)))) {
 		err = errno;
-		ntfs_log_error("Failed to add entry to the index.\n");
+		ntfs_log_error("Failed to add entry to the index: %s.\n",
+				strerror(err));
 		goto err_out;
 	}
 	/* Set hard links count and directory flag. */
@@ -1506,6 +1512,7 @@ search:
 		ntfs_attr_reinit_search_ctx(actx);
 		goto search;
 	}
+	/* TODO: Update object id, quota and securiry indexes if required. */
 	/*
 	 * If hard link count is not equal to zero then we are done. In other
 	 * case there are no reference to this inode left, so we should free all
Index: index.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/index.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -p -r1.24 -r1.25
--- index.c	4 Dec 2005 22:42:51 -0000	1.24
+++ index.c	19 Feb 2006 00:37:16 -0000	1.25
@@ -527,7 +527,8 @@ retry:
 					INDEX_ROOT, index))) {
 				err = EOPNOTSUPP;
 				ntfs_attr_close(na);
-				ntfs_log_error("Failed to truncate INDEX_ROOT.\n");
+				ntfs_log_debug("Failed to truncate "
+						"INDEX_ROOT.\n");
 				goto err_out;
 			}
 			ntfs_attr_close(na);
 |