Changes by: yura
Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs
In directory delta357:/tmp/cvs-serv10367/ntfsprogs
Modified Files:
ntfslabel.c utils.c
Log Message:
fix sparse errors. and first steps towards endianness checking
Index: ntfslabel.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfslabel.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -p -r1.22 -r1.23
--- ntfslabel.c 12 Nov 2006 22:46:50 -0000 1.22
+++ ntfslabel.c 12 Dec 2006 15:02:25 -0000 1.23
@@ -326,7 +326,7 @@ static int change_label(ntfs_volume *vol
"allowed. Truncating excess characters.\n",
(unsigned)(0x100 / sizeof(ntfschar)));
label_len = 0x100;
- new_label[label_len / sizeof(ntfschar)] = cpu_to_le16(L'\0');
+ new_label[label_len / sizeof(ntfschar)] = 0;
}
if (a) {
if (resize_resident_attribute_value(ctx->mrec, a, label_len)) {
Index: utils.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/utils.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -p -r1.70 -r1.71
--- utils.c 28 Nov 2006 10:09:57 -0000 1.70
+++ utils.c 12 Dec 2006 15:02:25 -0000 1.71
@@ -441,11 +441,12 @@ ATTR_RECORD * find_first_attribute(const
* if parent is 5 (/) stop
* get inode of parent
*/
+#define max_path 20
int utils_inode_get_name(ntfs_inode *inode, char *buffer, int bufsize)
{
// XXX option: names = posix/win32 or dos
// flags: path, filename, or both
- const int max_path = 20;
+
ntfs_volume *vol;
ntfs_attr_search_ctx *ctx;
@@ -555,6 +556,7 @@ int utils_inode_get_name(ntfs_inode *ino
return 1;
}
+#undef max_path
/**
* utils_attr_get_name
|