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.
This commit is contained in:
antona 2005-06-20 14:31:30 +00:00
parent 0e364b49aa
commit ca873f0474
27 changed files with 943 additions and 1501 deletions

View File

@ -5,7 +5,6 @@ Current active developers on the project are (in alphabetical order):
Anton Altaparmakov <aia21@cantab.net>
Yuval Fledel (no email address on request)
Lode Leroy <lode_leroy@hotmail.com>
Leonard Norrgård <vinsci@nic.funet.fi>
Yura Pakhuchiy <pakhuchiy@gmail.com>
Richard Russon <ntfs@flatcap.org>
Szakacsits Szabolcs <szaka@sienet.hu>

View File

@ -1,4 +1,4 @@
xx/xx/2005 - 2.0.0-WIP
20/06/2005 - 1.10.0 - Lots of new features, enhancements, and bug fixes.
- Add start_vcn parameter to ntfs_get_size_for_mapping_pairs() and
ntfs_mapping_pairs_build() and adapt all callers.
@ -162,6 +162,11 @@ xx/xx/2005 - 2.0.0-WIP
- Move utils_pathname_to_inode from to library (dir.c), adapt it
for the library, rename it to ntfs_pathname_to_inode, update all
users. (Yura)
- 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. (Anton)
- Determine endianness in ./configure and use that in addition to
existing mechanisms for determining endianness. (Anton)
04/09/2004 - 1.9.4 - Urgent bug fixes.

View File

@ -140,7 +140,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@

6
NEWS
View File

@ -9,7 +9,8 @@ Moved back from BitKeeper to CVS on SF.net.
ntfsprogs should now work completely on Windows 2000 and XP (Cygwin).
mkntfs does not create bootable volumes when on Windows. Volumes are locked
when using a R/W utility in order to prevent data corruption. (Yuval Fledel)
when using a R/W utility in order to prevent data corruption. (Yuval Fledel,
Anton Altaparmakov)
ntfsinfo has been extended and now provides much more detailed information as
well as being able to resolve a path/filename instead of requiring the inode
@ -29,8 +30,7 @@ Linux.
ntfsprogs ("make libs" only) now compiles on FreeBSD, NetBSD, Windows (Cygwin),
and DOS (DJGPP). Thanks to Christophe Grenier for DOS and FreeBSD testing
and fixes and to Lode Leroy for Windows testing and fixes. Note, the Windows
version is read-only and has limited functionality at present.
and fixes and to Lode Leroy for Windows testing and fixes.
Older news

2
README
View File

@ -117,3 +117,5 @@ ntfsls - List information about files in a directory residing on an NTFS
partition. See man 8 ntfsls for details.
ntfscat - Concatenate files and print their contents on the standard output.
ntfscp - Overwrite files on an NTFS partition.

520
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@ -24,8 +24,8 @@ fi
exit 1
}
echo Running autoreconf --verbose --install --warnings=all
autoreconf --force --verbose --install --warnings=all
echo Running autoreconf --verbose --install
autoreconf --force --verbose --install
# This gets around the BitKeeper problem that it checks out files with the
# current time stamp rather than the time stamp at check in time.

64
config.guess vendored
View File

@ -136,6 +136,16 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}" in
i?86)
test -z "$VENDOR" && VENDOR=pc
;;
*)
test -z "$VENDOR" && VENDOR=unknown
;;
esac
test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@ -825,25 +835,25 @@ EOF
echo ${UNAME_MACHINE}-pc-minix
exit 0 ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux
exit 0 ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
echo cris-axis-linux
exit 0 ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu
echo crisv32-axis-linux
exit 0 ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
echo frv-${VENDOR}-linux
exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux
exit 0 ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux
exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux
exit 0 ;;
mips:Linux:*:*)
eval $set_cc_for_build
@ -862,7 +872,7 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
;;
mips64:Linux:*:*)
eval $set_cc_for_build
@ -881,13 +891,13 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
echo powerpc-${VENDOR}-linux
exit 0 ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
echo powerpc64-${VENDOR}-linux
exit 0 ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@ -900,34 +910,34 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC}
exit 0 ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-gnu ;;
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
PA7*) echo hppa1.1-${VENDOR}-linux ;;
PA8*) echo hppa2.0-${VENDOR}-linux ;;
*) echo hppa-${VENDOR}-linux ;;
esac
exit 0 ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
echo hppa64-${VENDOR}-linux
exit 0 ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux
exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux
exit 0 ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-${VENDOR}-linux
exit 0 ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
echo x86_64-${VENDOR}-linux
exit 0 ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
@ -942,18 +952,18 @@ EOF
p'`
case "$ld_supported_targets" in
elf32-i386)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux"
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
echo "${UNAME_MACHINE}-${VENDOR}-linuxaout"
exit 0 ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff"
exit 0 ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# Either a pre-BFD a.out linker (linuxoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld"
exit 0 ;;
esac
# Determine whether the default compiler is a.out or elf
@ -982,7 +992,7 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" | sed 's/linux-gnu/linux/' && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
i*86:DYNIX/ptx:4*:*)

View File

@ -60,10 +60,6 @@
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if long double works and has more range or precision than
double. */
#undef HAVE_LONG_DOUBLE
/* Define to 1 if you have the <machine/endian.h> header file. */
#undef HAVE_MACHINE_ENDIAN_H
@ -239,6 +235,14 @@
/* Version number of package */
#undef VERSION
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define to 1 if your processor stores words with the least significant byte
first (like Intel and VAX, unlike Motorola and SPARC). */
#undef WORDS_LITTLEENDIAN
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS

5
config.sub vendored
View File

@ -1172,7 +1172,7 @@ case $os in
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
@ -1205,9 +1205,6 @@ case $os in
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;

1372
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
# configure.ac - Source file to generate "./configure" to prepare package for
# compilation.
#
# Copyright (c) 2000-2004 Anton Altaparmakov
# Copyright (c) 2000-2005 Anton Altaparmakov
# Copyright (c) 2003 Jan Kratochvil
#
# This program/include file is free software; you can redistribute it and/or
@ -22,7 +22,7 @@
#
AC_PREREQ(2.59)
AC_INIT([ntfsprogs],[2.0.0-WIP],[linux-ntfs-dev@lists.sourceforge.net])
AC_INIT([ntfsprogs],[1.10.0],[linux-ntfs-dev@lists.sourceforge.net])
AC_CANONICAL_HOST([])
AC_CANONICAL_TARGET([])
AC_CONFIG_SRCDIR([config.h.in])
@ -199,9 +199,13 @@ AC_CHECK_HEADERS([ctype.h fcntl.h libintl.h limits.h locale.h mntent.h \
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_BIGENDIAN(,
[AC_DEFINE([WORDS_LITTLEENDIAN], 1,
[Define to 1 if your processor stores words with the least significant
byte first (like Intel and VAX, unlike Motorola and SPARC).])]
,)
AC_C_CONST
AC_C_INLINE
AC_C_LONG_DOUBLE
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_STRUCT_ST_BLOCKS

View File

@ -115,7 +115,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@

View File

@ -124,7 +124,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@

View File

@ -128,7 +128,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@

View File

@ -2,7 +2,7 @@
* endians.h - Definitions related to handling of byte ordering. Part of the
* Linux-NTFS project.
*
* Copyright (c) 2000-2004 Anton Altaparmakov
* Copyright (c) 2000-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
@ -65,11 +65,13 @@
# define __BYTE_ORDER __BYTE_ORDER__
# define __LITTLE_ENDIAN __LITTLE_ENDIAN__
# define __BIG_ENDIAN __BIG_ENDIAN__
# elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
# elif (defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)) || \
defined(WORDS_LITTLEENDIAN)
# define __BYTE_ORDER 1
# define __LITTLE_ENDIAN 1
# define __BIG_ENDIAN 0
# elif !defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN)
# elif (!defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN)) || \
defined(WORDS_BIGENDIAN)
# define __BYTE_ORDER 0
# define __LITTLE_ENDIAN 1
# define __BIG_ENDIAN 0

View File

@ -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@

View File

@ -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(ntfs_attr *na, ntfs_inode *ni,
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(ntfs_inode *ni, ATTR_TYPES type,
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,

View File

@ -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 *ni, ATTR_RECORD *attr)
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_search_ctx *ctx)
}
/* 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",

View File

@ -3,7 +3,7 @@
* libntfs. Part of the Linux-NTFS project.
*
* Copyright (c) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
* 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_directory_filldir(
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(struct libntfs_file *libntfs_file)
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)

View File

@ -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 *ni)
}
/* 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",

View File

@ -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(RESTART_PAGE_HEADER *rp)
*/
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(RESTART_PAGE_HEADER *rp)
*/
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 "

365
ltmain.sh
View File

@ -17,7 +17,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -43,8 +43,8 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=1.5.18
TIMESTAMP=" (1.1220.2.246 2005/05/16 10:00:18)"
VERSION=1.5.14
TIMESTAMP=" (1.1220.2.195 2005/02/12 12:12:33)"
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
@ -112,9 +112,8 @@ if test "${LANG+set}" = set; then
fi
# Make sure IFS has a sensible default
lt_nl='
'
IFS=" $lt_nl"
: ${IFS="
"}
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
$echo "$modename: not configured to build any kind of library" 1>&2
@ -251,14 +250,37 @@ func_extract_an_archive ()
{
f_ex_an_ar_dir="$1"; shift
f_ex_an_ar_oldlib="$1"
f_ex_an_ar_lib=`$echo "X$f_ex_an_ar_oldlib" | $Xsed -e 's%^.*/%%'`
$show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
$run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
exit $EXIT_FAILURE
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
$show "cp $f_ex_an_ar_oldlib $f_ex_an_ar_dir/$f_ex_an_ar_lib"
$run eval "cp \$f_ex_an_ar_oldlib \$f_ex_an_ar_dir/\$f_ex_an_ar_lib"
$AR t "$f_ex_an_ar_oldlib" | sort | uniq -c \
| $EGREP -v '^[ ]*1[ ]' | while read count name
do
i=1
while test "$i" -le "$count"
do
# Put our $i before any first dot (extension)
# Never overwrite any file
name_to="$name"
while test "X$name_to" = "X$name" || test -f "$f_ex_an_ar_dir/$name_to"
do
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
done
$show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_lib '$name' && $mv '$name' '$name_to')"
$run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_lib '$name' && $mv '$name' '$name_to' && $AR -d \$f_ex_an_ar_lib '$name')" || exit $?
i=`expr $i + 1`
done
done
$show "$rm $f_ex_an_ar_dir/$f_ex_an_ar_lib"
$run eval "$rm \$f_ex_an_ar_dir/\$f_ex_an_ar_lib"
fi
}
@ -735,15 +757,6 @@ if test -z "$show_help"; then
esac
done
qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
case $qlibobj in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
qlibobj="\"$qlibobj\"" ;;
esac
if test "X$libobj" != "X$qlibobj"; then
$echo "$modename: libobj name \`$libobj' may not contain shell special characters."
exit $EXIT_FAILURE
fi
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then
@ -816,17 +829,12 @@ compiler."
$run $rm $removelist
exit $EXIT_FAILURE
fi
$echo "$srcfile" > "$lockfile"
$echo $srcfile > "$lockfile"
fi
if test -n "$fix_srcfile_path"; then
eval srcfile=\"$fix_srcfile_path\"
fi
qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
case $qsrcfile in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
qsrcfile="\"$qsrcfile\"" ;;
esac
$run $rm "$libobj" "${libobj}T"
@ -848,10 +856,10 @@ EOF
fbsd_hideous_sh_bug=$base_compile
if test "$pic_mode" != no; then
command="$base_compile $qsrcfile $pic_flag"
command="$base_compile $srcfile $pic_flag"
else
# Don't build PIC code
command="$base_compile $qsrcfile"
command="$base_compile $srcfile"
fi
if test ! -d "${xdir}$objdir"; then
@ -931,9 +939,9 @@ EOF
if test "$build_old_libs" = yes; then
if test "$pic_mode" != yes; then
# Don't build PIC code
command="$base_compile $qsrcfile"
command="$base_compile $srcfile"
else
command="$base_compile $qsrcfile $pic_flag"
command="$base_compile $srcfile $pic_flag"
fi
if test "$compiler_c_o" = yes; then
command="$command -o $obj"
@ -1357,8 +1365,6 @@ EOF
;;
darwin_framework)
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
prev=
continue
;;
@ -1423,8 +1429,6 @@ EOF
-framework)
prev=darwin_framework
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
continue
;;
@ -2848,13 +2852,13 @@ EOF
*) continue ;;
esac
case " $deplibs " in
*" $path "*) ;;
*) deplibs="$path $deplibs" ;;
esac
case " $deplibs " in
*" $depdepl "*) ;;
*) deplibs="$depdepl $deplibs" ;;
esac
case " $deplibs " in
*" $path "*) ;;
*) deplibs="$deplibs $path" ;;
esac
done
fi # link_all_deplibs != no
fi # linkmode = lib
@ -3120,7 +3124,7 @@ EOF
case $current in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
$echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
@ -3129,7 +3133,7 @@ EOF
case $revision in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
$echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
@ -3138,7 +3142,7 @@ EOF
case $age in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
$echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
@ -4365,18 +4369,8 @@ extern \"C\" {
export_symbols="$output_objdir/$outputname.exp"
$run $rm $export_symbols
$run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
case $host in
*cygwin* | *mingw* )
$run eval "${SED} -e '1iEXPORTS'"' < "$export_symbols" > "$output_objdir/$outputname.def"'
;;
esac
else
$run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
case $host in
*cygwin* | *mingw* )
$run eval "${SED} -e '1iEXPORTS'"' < "$output_objdir/$outputname.exp" > "$output_objdir/$outputname.def"'
;;
esac
$run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"'
fi
@ -4499,25 +4493,12 @@ static const void *lt_preloaded_setup() {
$run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
# Clean up the generated files.
#$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
#$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
# Transform the symbol file into the correct name.
case $host in
*cygwin* | *mingw* )
if test -f "$output_objdir/${outputname}.def" ; then
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
else
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
fi
;;
* )
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
;;
esac
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
;;
*)
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
@ -4546,9 +4527,8 @@ static const void *lt_preloaded_setup() {
# Delete the generated files.
if test -n "$dlsyms"; then
#$show "$rm $output_objdir/${outputname}S.${objext}"
#$run $rm "$output_objdir/${outputname}S.${objext}"
:
$show "$rm $output_objdir/${outputname}S.${objext}"
$run $rm "$output_objdir/${outputname}S.${objext}"
fi
exit $status
@ -4691,9 +4671,8 @@ static const void *lt_preloaded_setup() {
esac
case $host in
*cygwin* | *mingw* )
output_path=`dirname $output`
cwrappersource=`$echo ${output_path}/${objdir}/lt-${outputname}.c`
cwrapper=`$echo ${output_path}/${outputname}.exe`
cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
cwrapper=`$echo ${output}.exe`
$rm $cwrappersource $cwrapper
trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
@ -4720,7 +4699,6 @@ EOF
#include <malloc.h>
#include <stdarg.h>
#include <assert.h>
#include <sys/stat.h>
#if defined(PATH_MAX)
# define LT_PATHMAX PATH_MAX
@ -4731,19 +4709,15 @@ EOF
#endif
#ifndef DIR_SEPARATOR
# define DIR_SEPARATOR '/'
# define PATH_SEPARATOR ':'
#define DIR_SEPARATOR '/'
#endif
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
defined (__OS2__)
# define HAVE_DOS_BASED_FILE_SYSTEM
# ifndef DIR_SEPARATOR_2
# define DIR_SEPARATOR_2 '\\'
# endif
# ifndef PATH_SEPARATOR_2
# define PATH_SEPARATOR_2 ';'
# endif
#define HAVE_DOS_BASED_FILE_SYSTEM
#ifndef DIR_SEPARATOR_2
#define DIR_SEPARATOR_2 '\\'
#endif
#endif
#ifndef DIR_SEPARATOR_2
@ -4753,30 +4727,17 @@ EOF
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
#endif /* DIR_SEPARATOR_2 */
#ifndef PATH_SEPARATOR_2
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
#else /* PATH_SEPARATOR_2 */
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
#endif /* PATH_SEPARATOR_2 */
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
#define XFREE(stale) do { \
if (stale) { free ((void *) stale); stale = 0; } \
} while (0)
#if defined DEBUGWRAPPER
# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
#else
# define DEBUG(format, ...)
#endif
const char *program_name = NULL;
void * xmalloc (size_t num);
char * xstrdup (const char *string);
char * basename (const char *name);
char * find_executable(const char *wrapper);
int check_executable(const char *path);
char * fnqualify(const char *path);
char * strendzap(char *str, const char *pat);
void lt_fatal (const char *message, ...);
@ -4787,8 +4748,6 @@ main (int argc, char *argv[])
int i;
program_name = (char *) xstrdup ((char *) basename (argv[0]));
DEBUG("(main) argv[0] : %s\n",argv[0]);
DEBUG("(main) program_name : %s\n",program_name);
newargz = XMALLOC(char *, argc+2);
EOF
@ -4797,23 +4756,13 @@ EOF
EOF
cat >> $cwrappersource <<"EOF"
newargz[1] = find_executable(argv[0]);
if (newargz[1] == NULL)
lt_fatal("Couldn't find %s", argv[0]);
DEBUG("(main) found exe at : %s\n",newargz[1]);
newargz[1] = fnqualify(argv[0]);
/* we know the script has the same name, without the .exe */
/* so make sure newargz[1] doesn't end in .exe */
strendzap(newargz[1],".exe");
for (i = 1; i < argc; i++)
newargz[i+1] = xstrdup(argv[i]);
newargz[argc+1] = NULL;
for (i=0; i<argc+1; i++)
{
DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
;
}
EOF
cat >> $cwrappersource <<EOF
@ -4856,126 +4805,32 @@ basename (const char *name)
base = name + 1;
return (char *) base;
}
int
check_executable(const char * path)
{
struct stat st;
DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
if ((!path) || (!*path))
return 0;
if ((stat (path, &st) >= 0) &&
(((st.st_mode & S_IXOTH) == S_IXOTH) ||
((st.st_mode & S_IXGRP) == S_IXGRP) ||
((st.st_mode & S_IXUSR) == S_IXUSR)))
return 1;
else
return 0;
}
/* Searches for the full path of the wrapper. Returns
newly allocated full path name if found, NULL otherwise */
char *
find_executable (const char* wrapper)
fnqualify(const char *path)
{
int has_slash = 0;
const char* p;
const char* p_next;
struct stat st;
/* static buffer for getcwd */
size_t size;
char *p;
char tmp[LT_PATHMAX + 1];
int tmp_len;
char* concat_name;
DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
if ((wrapper == NULL) || (*wrapper == '\0'))
return NULL;
assert(path != NULL);
/* Absolute path? */
/* Is it qualified already? */
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
if (isalpha (wrapper[0]) && wrapper[1] == ':')
{
concat_name = xstrdup (wrapper);
if (check_executable(concat_name))
return concat_name;
XFREE(concat_name);
}
else
{
#endif
if (IS_DIR_SEPARATOR (wrapper[0]))
{
concat_name = xstrdup (wrapper);
if (check_executable(concat_name))
return concat_name;
XFREE(concat_name);
}
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
}
if (isalpha (path[0]) && path[1] == ':')
return xstrdup (path);
#endif
if (IS_DIR_SEPARATOR (path[0]))
return xstrdup (path);
for (p = wrapper; *p; p++)
if (*p == '/')
{
has_slash = 1;
break;
}
if (!has_slash)
{
/* no slashes; search PATH */
const char* path = getenv ("PATH");
if (path != NULL)
{
for (p = path; *p; p = p_next)
{
const char* q;
size_t p_len;
for (q = p; *q; q++)
if (IS_PATH_SEPARATOR(*q))
break;
p_len = q - p;
p_next = (*q == '\0' ? q : q + 1);
if (p_len == 0)
{
/* empty path: current directory */
if (getcwd (tmp, LT_PATHMAX) == NULL)
lt_fatal ("getcwd failed");
tmp_len = strlen(tmp);
concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
memcpy (concat_name, tmp, tmp_len);
concat_name[tmp_len] = '/';
strcpy (concat_name + tmp_len + 1, wrapper);
}
else
{
concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
memcpy (concat_name, p, p_len);
concat_name[p_len] = '/';
strcpy (concat_name + p_len + 1, wrapper);
}
if (check_executable(concat_name))
return concat_name;
XFREE(concat_name);
}
}
/* not found in PATH; assume curdir */
}
/* Relative path | not found in path: prepend cwd */
/* prepend the current directory */
/* doesn't handle '~' */
if (getcwd (tmp, LT_PATHMAX) == NULL)
lt_fatal ("getcwd failed");
tmp_len = strlen(tmp);
concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
memcpy (concat_name, tmp, tmp_len);
concat_name[tmp_len] = '/';
strcpy (concat_name + tmp_len + 1, wrapper);
if (check_executable(concat_name))
return concat_name;
XFREE(concat_name);
return NULL;
size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
p = XMALLOC(char, size);
sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
return p;
}
char *
@ -5236,63 +5091,6 @@ fi\
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
cmds=$old_archive_from_new_cmds
else
# POSIX demands no paths to be encoded in archives. We have
# to avoid creating archives with duplicate basenames if we
# might have to extract them afterwards, e.g., when creating a
# static archive out of a convenience library, or when linking
# the entirety of a libtool archive into another (currently
# not supported by libtool).
if (for obj in $oldobjs
do
$echo "X$obj" | $Xsed -e 's%^.*/%%'
done | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "copying selected object files to avoid basename conflicts..."
if test -z "$gentop"; then
gentop="$output_objdir/${outputname}x"
generated="$generated $gentop"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
fi
save_oldobjs=$oldobjs
oldobjs=
counter=1
for obj in $save_oldobjs
do
objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
case " $oldobjs " in
" ") oldobjs=$obj ;;
*[\ /]"$objbase "*)
while :; do
# Make sure we don't pick an alternate name that also
# overlaps.
newobj=lt$counter-$objbase
counter=`expr $counter + 1`
case " $oldobjs " in
*[\ /]"$newobj "*) ;;
*) if test ! -f "$gentop/$newobj"; then break; fi ;;
esac
done
$show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
$run ln "$obj" "$gentop/$newobj" ||
$run cp "$obj" "$gentop/$newobj"
oldobjs="$oldobjs $gentop/$newobj"
;;
*) oldobjs="$oldobjs $obj" ;;
esac
done
fi
eval cmds=\"$old_archive_cmds\"
if len=`expr "X$cmds" : ".*"` &&
@ -5306,7 +5104,20 @@ fi\
objlist=
concat_cmds=
save_oldobjs=$oldobjs
# GNU ar 2.10+ was changed to match POSIX; thus no paths are
# encoded into archives. This makes 'ar r' malfunction in
# this piecewise linking case whenever conflicting object
# names appear in distinct ar calls; check, warn and compensate.
if (for obj in $save_oldobjs
do
$echo "X$obj" | $Xsed -e 's%^.*/%%'
done | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
$echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
AR_FLAGS=cq
fi
# Is there a better way of finding the last object in the list?
for obj in $save_oldobjs
do
@ -6215,14 +6026,14 @@ relink_command=\"$relink_command\""
fi
# Now prepare to actually exec the command.
exec_cmd="\$cmd$args"
exec_cmd="\"\$cmd\"$args"
else
# Display what would be done.
if test -n "$shlibpath_var"; then
eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
$echo "export $shlibpath_var"
fi
$echo "$cmd$args"
eval \$echo \"\$cmd\"$args
exit $EXIT_SUCCESS
fi
;;

View File

@ -225,7 +225,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@

View File

@ -2,6 +2,7 @@
* ntfscp - Part of the Linux-NTFS project.
*
* Copyright (c) 2004-2005 Yura Pakhuchiy
* Copyright (c) 2005 Anton Altaparmakov
*
* This utility will overwrite files on ntfs volume
*
@ -267,7 +268,7 @@ int main (int argc, char *argv[])
u64 offset;
char *buf;
s64 br, bw;
ntfschar *attr_name = NULL;
ntfschar *attr_name = AT_UNNAMED;
int attr_name_len = 0;
if (!parse_options(argc, argv))

View File

@ -3,6 +3,7 @@
*
* Copyright (c) 2002-2005 Richard Russon
* Copyright (c) 2004-2005 Holger Ohmacht
* Copyright (c) 2005 Anton Altaparmakov
*
* This utility will recover deleted files from an NTFS volume.
*
@ -793,7 +794,7 @@ static void get_parent_name (struct filename* name, ntfs_volume* vol)
return;
}
mft_data = ntfs_attr_open(vol->mft_ni, AT_DATA, NULL, 0);
mft_data = ntfs_attr_open(vol->mft_ni, AT_DATA, AT_UNNAMED, 0);
if (!mft_data) {
Eprintf ("ERROR: Couldn't open $MFT/$DATA: %s\n", strerror (errno));
} else {
@ -1025,7 +1026,7 @@ static struct ufile * read_record (ntfs_volume *vol, long long record)
return NULL;
}
mft = ntfs_attr_open (vol->mft_ni, AT_DATA, NULL, 0);
mft = ntfs_attr_open (vol->mft_ni, AT_DATA, AT_UNNAMED, 0);
if (!mft) {
Eprintf ("ERROR: Couldn't open $MFT/$DATA: %s\n", strerror (errno));
free_file (file);
@ -1947,7 +1948,7 @@ static int copy_mft (ntfs_volume *vol, long long mft_begin, long long mft_end)
return 1;
}
mft = ntfs_attr_open (vol->mft_ni, AT_DATA, NULL, 0);
mft = ntfs_attr_open (vol->mft_ni, AT_DATA, AT_UNNAMED, 0);
if (!mft) {
Eprintf ("Couldn't open $MFT/$DATA: %s\n", strerror (errno));
goto free;

View File

@ -2,7 +2,7 @@
* utils.c - Part of the Linux-NTFS project.
*
* Copyright (c) 2002-2004 Richard Russon
* Copyright (c) 2003-2004 Anton Altaparmakov
* Copyright (c) 2003-2005 Anton Altaparmakov
* Copyright (c) 2003 Lode Leroy
*
* A set of shared functions for ntfs utilities
@ -619,7 +619,7 @@ int utils_cluster_in_use (ntfs_volume *vol, long long lcn)
/* Does lcn lie in the section of $Bitmap we already have cached? */
if ((lcn < bmplcn) || (lcn >= (bmplcn + (sizeof (buffer) << 3)))) {
Dprintf ("Bit lies outside cache.\n");
attr = ntfs_attr_open (vol->lcnbmp_ni, AT_DATA, NULL, 0);
attr = ntfs_attr_open (vol->lcnbmp_ni, AT_DATA, AT_UNNAMED, 0);
if (!attr) {
Eprintf ("Couldn't open $Bitmap: %s\n", strerror (errno));
return -1;
@ -967,7 +967,8 @@ int mft_next_record (struct mft_search_ctx *ctx)
return -1;
}
mft = ntfs_attr_open (ctx->vol->mft_ni, AT_DATA, NULL, 0);
mft = ntfs_attr_open (ctx->vol->mft_ni, AT_DATA,
AT_UNNAMED, 0);
if (!mft) {
Eprintf ("Couldn't open $MFT/$DATA: %s\n", strerror (errno));
// free / close