Changes by: antona
Update of /cvsroot/linux-ntfs/ntfsprogs/libntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11789/libntfs
Modified Files:
Makefile.in attrib.c attrlist.c gnome-vfs-method.c inode.c
logfile.c
Log Message:
Eeek. Someone did a commit just as I was about to commit so the commit
message was lost! )-:
Now again...
Monster commit from me due to lack of time. Sorry about that.
Features:
- Version to 1.10.0
- Update readme, etc ready for release.
- Update build system to suse linux 9.3 versions.
- Fix warnings appearing for me on suse 9.3 with --enable-warnings --enable-debug.
- Set attr_name to NULL in libntfs/attrib.c::__ntfs_attr_init() and fixup all
callers apropriately. Thanks to FlatCap/Rich for pointing this out.
- Determine endianness in ./configure and use that in addition to existing
mechanisms for determining endianness.
Index: Makefile.in
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/Makefile.in,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -p -r1.44 -r1.45
--- Makefile.in 6 Jun 2005 14:31:42 -0000 1.44
+++ Makefile.in 20 Jun 2005 14:31:58 -0000 1.45
@@ -190,7 +190,6 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
Index: attrib.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/attrib.c,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -p -r1.162 -r1.163
--- attrib.c 20 Jun 2005 14:23:27 -0000 1.162
+++ attrib.c 20 Jun 2005 14:31:58 -0000 1.163
@@ -1,7 +1,7 @@
/*
* attrib.c - Attribute handling code. Part of the Linux-NTFS project.
*
- * Copyright (c) 2000-2004 Anton Altaparmakov
+ * Copyright (c) 2000-2005 Anton Altaparmakov
* Copyright (c) 2002 Richard Russon
* Copyright (c) 2004-2005 Yura Pakhuchiy
*
@@ -252,13 +252,11 @@ static __inline__ void __ntfs_attr_init(
na->rl = NULL;
na->ni = ni;
na->type = type;
- if (name) {
- na->name = name;
+ na->name = name;
+ if (name)
na->name_len = name_len;
- } else {
- na->name = NULL;
+ else
na->name_len = 0;
- }
}
/**
@@ -2693,8 +2691,8 @@ int ntfs_non_resident_attr_record_add(nt
ntfs_inode_mark_dirty(ni);
/*
* Locate offset from start of the MFT record where new attribute is
- * placed. We need relookup it, because record maybe moved during update
- * of attribute list.
+ * placed. We need relookup it, because record maybe moved during
+ * update of attribute list.
*/
ntfs_attr_reinit_search_ctx(ctx);
if (ntfs_attr_lookup(type, name, name_len, CASE_SENSITIVE,
Index: attrlist.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/attrlist.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- attrlist.c 19 Jun 2005 21:09:40 -0000 1.23
+++ attrlist.c 20 Jun 2005 14:31:58 -0000 1.24
@@ -2,7 +2,7 @@
* attrlist.c - Attribute list attribute handling code. Part of the Linux-NTFS
* project.
*
- * Copyright (c) 2004 Anton Altaparmakov
+ * Copyright (c) 2004-2005 Anton Altaparmakov
* Copyright (c) 2004-2005 Yura Pakhuchiy
*
* This program/include file is free software; you can redistribute it and/or
@@ -187,7 +187,7 @@ int ntfs_attrlist_entry_add(ntfs_inode *
attr->name_length * sizeof(ntfschar));
/* Resize $ATTRIBUTE_LIST to new length. */
- na = ntfs_attr_open(ni, AT_ATTRIBUTE_LIST, NULL, 0);
+ na = ntfs_attr_open(ni, AT_ATTRIBUTE_LIST, AT_UNNAMED, 0);
if (!na) {
err = errno;
Dprintf("%s(): Failed to open $ATTRIBUTE_LIST attribute.\n",
@@ -272,7 +272,7 @@ int ntfs_attrlist_entry_rm(ntfs_attr_sea
}
/* Reisze $ATTRIBUTE_LIST to new length. */
- na = ntfs_attr_open(base_ni, AT_ATTRIBUTE_LIST, NULL, 0);
+ na = ntfs_attr_open(base_ni, AT_ATTRIBUTE_LIST, AT_UNNAMED, 0);
if (!na) {
err = errno;
Dprintf("%s(): Failed to open $ATTRIBUTE_LIST attribute.\n",
Index: gnome-vfs-method.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/gnome-vfs-method.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- gnome-vfs-method.c 19 Jun 2005 21:09:40 -0000 1.5
+++ gnome-vfs-method.c 20 Jun 2005 14:31:58 -0000 1.6
@@ -3,7 +3,7 @@
* libntfs. Part of the Linux-NTFS project.
*
* Copyright (c) 2003 Jan Kratochvil <pro...@ja...>
- * Copyright (c) 2003 Anton Altaparmakov
+ * Copyright (c) 2003-2005 Anton Altaparmakov
*
* This program/include file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
@@ -393,8 +393,8 @@ static int libntfs_gnomevfs_read_directo
attr = ntfs_attr_open(inode, /* ni */
AT_DATA, /* type */
- NULL, /* name */
- 0); /* name_len */
+ AT_UNNAMED, /* name */
+ 0); /* name_len */
/* FIXME: Check failed 'attr' open. */
if (attr) {
/* FIXME: Is 'data_size' the right field? */
@@ -488,7 +488,7 @@ static GnomeVFSResult libntfs_open_attr(
libntfs_file->attr = ntfs_attr_open(
libntfs_file->inode, /* ni */
AT_DATA, /* type */
- NULL, /* name */
+ AT_UNNAMED, /* name */
0); /* name_len */
G_UNLOCK(libntfs);
if (!libntfs_file->attr)
Index: inode.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/inode.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- inode.c 19 Jun 2005 21:09:40 -0000 1.55
+++ inode.c 20 Jun 2005 14:31:58 -0000 1.56
@@ -1,7 +1,7 @@
/*
* inode.c - Inode handling code. Part of the Linux-NTFS project.
*
- * Copyright (c) 2002-2004 Anton Altaparmakov
+ * Copyright (c) 2002-2005 Anton Altaparmakov
* Copyright (c) 2004-2005 Yura Pakhuchiy
*
* This program/include file is free software; you can redistribute it and/or
@@ -626,7 +626,7 @@ int ntfs_inode_sync(ntfs_inode *ni)
NInoAttrListTestAndClearDirty(ni)) {
ntfs_attr *na;
- na = ntfs_attr_open(ni, AT_ATTRIBUTE_LIST, NULL, 0);
+ na = ntfs_attr_open(ni, AT_ATTRIBUTE_LIST, AT_UNNAMED, 0);
if (!na) {
if (!err || errno == EIO) {
err = errno;
@@ -845,7 +845,7 @@ int ntfs_inode_add_attrlist(ntfs_inode *
}
/* Resize it. */
- na = ntfs_attr_open(ni, AT_ATTRIBUTE_LIST, NULL, 0);
+ na = ntfs_attr_open(ni, AT_ATTRIBUTE_LIST, AT_UNNAMED, 0);
if (!na) {
err = errno;
Dprintf("%s(): Failed to open just added $ATTRIBUTE_LIST.\n",
Index: logfile.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/logfile.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- logfile.c 19 Jun 2005 21:09:40 -0000 1.3
+++ logfile.c 20 Jun 2005 14:31:58 -0000 1.4
@@ -1,7 +1,7 @@
/*
* logfile.c - NTFS journal handling. Part of the Linux-NTFS project.
*
- * Copyright (c) 2002-2004 Anton Altaparmakov
+ * Copyright (c) 2002-2005 Anton Altaparmakov
* Copyright (c) 2005 Yura Pakhuchiy
*
* This program/include file is free software; you can redistribute it and/or
@@ -162,7 +162,8 @@ static BOOL ntfs_check_restart_area(REST
*/
ca_ofs = le16_to_cpu(ra->client_array_offset);
if (((ca_ofs + 7) & ~7) != ca_ofs ||
- ra_ofs + ca_ofs > NTFS_BLOCK_SIZE - sizeof(u16)) {
+ ra_ofs + ca_ofs > (u16)(NTFS_BLOCK_SIZE -
+ sizeof(u16))) {
ntfs_error(vi->i_sb, "$LogFile restart area specifies "
"inconsistent client array offset.");
return FALSE;
@@ -174,8 +175,8 @@ static BOOL ntfs_check_restart_area(REST
*/
ra_len = ca_ofs + le16_to_cpu(ra->log_clients) *
sizeof(LOG_CLIENT_RECORD);
- if (ra_ofs + ra_len > le32_to_cpu(rp->system_page_size) ||
- ra_ofs + le16_to_cpu(ra->restart_area_length) >
+ if ((u32)(ra_ofs + ra_len) > le32_to_cpu(rp->system_page_size) ||
+ (u32)(ra_ofs + le16_to_cpu(ra->restart_area_length)) >
le32_to_cpu(rp->system_page_size) ||
ra_len > le16_to_cpu(ra->restart_area_length)) {
ntfs_error(vi->i_sb, "$LogFile restart area is out of bounds "
|