- Port collate.[ch] from kernel to library and implement


			
			
				edge.strict_endians
			
			
		
cha0smaster 2005-06-04 00:57:58 +00:00
parent c4cb316418
commit 2d8dc1736d
24 changed files with 7018 additions and 21145 deletions

View File

@ -148,6 +148,11 @@ xx/xx/2005 - 2.0.0-WIP
successfully created. (Szaka)
- mkntfs: Add new option -T which fakes the time to be 00:00:00 UTC,
Jan 1, 1970 instead of the current system time.
- Port collate.[ch] from kernel to library and implement
ntfs_collate_file_name. Thus we have new API's: ntfs_collate and
ntfs_is_collation_rule_supported. (Yura)
- Port index.[ch] from kernel to library. New API's: ntfs_index_lookup,
ntfs_index_ctx_{get,put}, ntfs_index_entry_mark_dirty. (Yura)
04/09/2004 - 1.9.4 - Urgent bug fixes.

11
INSTALL
View File

@ -1,7 +1,7 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
@ -189,13 +189,8 @@ them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). Here is a another example:
/bin/bash ./configure CONFIG_SHELL=/bin/bash
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.
will cause the specified gcc to be used as the C compiler (unless it is
overridden in the site shell script).
`configure' Invocation
======================

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -77,7 +77,6 @@ ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTODIRS = @AUTODIRS@
AUTOHEADER = @AUTOHEADER@
@ -88,10 +87,6 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@ -103,8 +98,6 @@ EGREP = @EGREP@
ENABLE_GNOME_VFS_FALSE = @ENABLE_GNOME_VFS_FALSE@
ENABLE_GNOME_VFS_TRUE = @ENABLE_GNOME_VFS_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -134,18 +127,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -263,13 +251,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -281,7 +263,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@ -289,13 +271,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -316,7 +292,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \

7823
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
scriptversion=2005-02-03.08
scriptversion=2004-10-12.08
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@ -47,11 +47,11 @@ right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
exit 0
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
exit 0
;;
esac

76
config.guess vendored
View File

@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
timestamp='2005-02-10'
timestamp='2004-11-12'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -53,7 +53,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@ -136,16 +136,6 @@ 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
@ -814,9 +804,6 @@ EOF
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit 0 ;;
amd64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
exit 0 ;;
@ -835,25 +822,25 @@ EOF
echo ${UNAME_MACHINE}-pc-minix
exit 0 ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
cris:Linux:*:*)
echo cris-axis-linux
echo cris-axis-linux-gnu
exit 0 ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux
echo crisv32-axis-linux-gnu
exit 0 ;;
frv:Linux:*:*)
echo frv-${VENDOR}-linux
echo frv-unknown-linux-gnu
exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
mips:Linux:*:*)
eval $set_cc_for_build
@ -872,7 +859,7 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
mips64:Linux:*:*)
eval $set_cc_for_build
@ -891,13 +878,13 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
ppc:Linux:*:*)
echo powerpc-${VENDOR}-linux
echo powerpc-unknown-linux-gnu
exit 0 ;;
ppc64:Linux:*:*)
echo powerpc64-${VENDOR}-linux
echo powerpc64-unknown-linux-gnu
exit 0 ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@ -910,34 +897,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}-${VENDOR}-linux${LIBC}
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${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-${VENDOR}-linux ;;
PA8*) echo hppa2.0-${VENDOR}-linux ;;
*) echo hppa-${VENDOR}-linux ;;
PA7*) echo hppa1.1-unknown-linux-gnu ;;
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
esac
exit 0 ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-${VENDOR}-linux
echo hppa64-unknown-linux-gnu
exit 0 ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
x86_64:Linux:*:*)
echo x86_64-${VENDOR}-linux
echo x86_64-unknown-linux-gnu
exit 0 ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
@ -952,18 +939,18 @@ EOF
p'`
case "$ld_supported_targets" in
elf32-i386)
TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux"
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-${VENDOR}-linuxaout"
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0 ;;
coff-i386)
echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff"
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0 ;;
"")
# Either a pre-BFD a.out linker (linuxoldld) or
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld"
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
exit 0 ;;
esac
# Determine whether the default compiler is a.out or elf
@ -992,7 +979,7 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" | sed 's/linux-gnu/linux/' && exit 0
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
i*86:DYNIX/ptx:4*:*)
@ -1210,9 +1197,6 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;

15
config.sub vendored
View File

@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
timestamp='2005-02-10'
timestamp='2004-11-30'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -70,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@ -237,7 +237,7 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| m32r | m32rle | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@ -310,7 +310,7 @@ case $basic_machine in
| ip2k-* | iq2000-* \
| m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@ -1172,7 +1172,7 @@ case $os in
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
@ -1205,6 +1205,9 @@ 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|'`
;;

15896
configure vendored

File diff suppressed because it is too large Load Diff

53
depcomp
View File

@ -1,9 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2005-02-09.22
scriptversion=2004-05-31.23
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -50,11 +50,11 @@ Environment variables:
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
exit 0
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
exit 0
;;
esac
@ -287,43 +287,36 @@ tru64)
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mecanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
# Dependencies are output in .lo.d with libtool 1.4.
# With libtool 1.5 they are output both in $dir.libs/$base.o.d
# and in $dir.libs/$base.o.d and $dir$base.o.d. We process the
# latter, because the former will be cleaned when $dir.libs is
# erased.
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir$base.o.d"
tmpdepfile3="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
tmpdepfile3="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
elif test -f "$tmpdepfile2"; then
tmpdepfile="$tmpdepfile2"
else
tmpdepfile="$tmpdepfile3"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -52,7 +52,6 @@ ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTODIRS = @AUTODIRS@
AUTOHEADER = @AUTOHEADER@
@ -63,10 +62,6 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@ -78,8 +73,6 @@ EGREP = @EGREP@
ENABLE_GNOME_VFS_FALSE = @ENABLE_GNOME_VFS_FALSE@
ENABLE_GNOME_VFS_TRUE = @ENABLE_GNOME_VFS_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -109,18 +102,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -61,7 +61,6 @@ ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTODIRS = @AUTODIRS@
AUTOHEADER = @AUTOHEADER@
@ -72,10 +71,6 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@ -87,8 +82,6 @@ EGREP = @EGREP@
ENABLE_GNOME_VFS_FALSE = @ENABLE_GNOME_VFS_FALSE@
ENABLE_GNOME_VFS_TRUE = @ENABLE_GNOME_VFS_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -118,18 +111,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -218,13 +206,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -236,7 +218,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@ -244,13 +226,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -271,7 +247,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \

View File

@ -5,6 +5,7 @@ linux_ntfsinclude_HEADERS = \
attrlist.h \
bitmap.h \
bootsect.h \
collate.h \
compat.h \
compress.h \
debug.h \
@ -14,6 +15,7 @@ linux_ntfsinclude_HEADERS = \
endians.h \
gnome-vfs-method.h \
gnome-vfs-module.h \
index.h \
inode.h \
layout.h \
lcnalloc.h \

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -65,7 +65,6 @@ ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTODIRS = @AUTODIRS@
AUTOHEADER = @AUTOHEADER@
@ -76,10 +75,6 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@ -91,8 +86,6 @@ EGREP = @EGREP@
ENABLE_GNOME_VFS_FALSE = @ENABLE_GNOME_VFS_FALSE@
ENABLE_GNOME_VFS_TRUE = @ENABLE_GNOME_VFS_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -122,18 +115,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -177,6 +165,7 @@ linux_ntfsinclude_HEADERS = \
attrlist.h \
bitmap.h \
bootsect.h \
collate.h \
compat.h \
compress.h \
debug.h \
@ -186,6 +175,7 @@ linux_ntfsinclude_HEADERS = \
endians.h \
gnome-vfs-method.h \
gnome-vfs-module.h \
index.h \
inode.h \
layout.h \
lcnalloc.h \

View File

@ -0,0 +1,54 @@
/*
* collate.h - Defines for NTFS kernel collation handling. Part of the
* Linux-NTFS project.
*
* Copyright (c) 2004 Anton Altaparmakov
* Copyright (c) 2005 Yura Pakhuchiy
*
* 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
* by the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program/include file is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program (in the main directory of the Linux-NTFS
* distribution in the file COPYING); if not, write to the Free Software
* Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _NTFS_COLLATE_H
#define _NTFS_COLLATE_H
#include "types.h"
#include "volume.h"
#define NTFS_COLLATION_ERROR -2
static inline BOOL ntfs_is_collation_rule_supported(COLLATION_RULES cr) {
int i;
/*
* FIXME: At the moment we only support COLLATION_BINARY,
* COLLATION_NTOFS_ULONG and COLLATION_FILE_NAME so we return false
* for everything else.
*/
if (cr != COLLATION_BINARY && cr != COLLATION_NTOFS_ULONG &&
cr != COLLATION_FILE_NAME)
return FALSE;
i = le32_to_cpu(cr);
if (((i >= 0) && (i <= 0x02)) ||
((i >= 0x10) && (i <= 0x13)))
return TRUE;
return FALSE;
}
extern int ntfs_collate(ntfs_volume *vol, COLLATION_RULES cr,
const void *data1, const int data1_len,
const void *data2, const int data2_len);
#endif /* _NTFS_COLLATE_H */

View File

@ -0,0 +1,114 @@
/*
* index.h - Defines for NTFS index handling. Part of the Linux-NTFS project.
*
* Copyright (c) 2004 Anton Altaparmakov
* Copyright (c) 2005 Yura Pakhuchiy
*
* 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
* by the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program/include file is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program (in the main directory of the Linux-NTFS
* distribution in the file COPYING); if not, write to the Free Software
* Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _NTFS_INDEX_H
#define _NTFS_INDEX_H
#include "attrib.h"
#include "types.h"
#include "layout.h"
#include "inode.h"
#include "mft.h"
/**
* @ni: inode containing the @entry described by this context
* @entry: index entry (points into @ir or @ia)
* @data: index entry data (points into @entry)
* @data_len: length in bytes of @data
* @is_in_root: TRUE if @entry is in @ir and FALSE if it is in @ia
* @ir: index root if @is_in_root and NULL otherwise
* @actx: attribute search context if @is_in_root and NULL otherwise
* @ia: index block if @is_in_root is FALSE and NULL otherwise
* @ia_na: opened INDEX_ALLOCATION attribute
* @ia_vcn: VCN from which @ia where read from
* @ia_dirty: TRUE if index block was changed
* @block_size: index block size
*
* @ni is the inode this context belongs to.
*
* @entry is the index entry described by this context. @data and @data_len
* are the index entry data and its length in bytes, respectively. @data
* simply points into @entry. This is probably what the user is interested in.
*
* If @is_in_root is TRUE, @entry is in the index root attribute @ir described
* by the attribute search context @actx and inode @ni. @ia, @ia_vcn and
* @ia_dirty are undifined in this case.
*
* If @is_in_root is FALSE, @entry is in the index allocation attribute and @ia
* and @ia_vcn point to the index allocation block and VCN where it's placed,
* respectively. @ir and @actx are NULL in this case. @ia_na is opened
* INDEX_ALLOCTAION attribute. @ia_dirty is TRUE if index block was changed and
* FALSE otherwise.
*
* To obtain a context call ntfs_index_ctx_get().
*
* When finished with the @entry and its @data, call ntfs_index_ctx_put() to
* free the context and other associated resources.
*
* If the index entry was modified, call ntfs_index_entry_mark_dirty() before
* the call to ntfs_index_ctx_put() to ensure that the changes are written
* to disk.
*/
typedef struct {
ntfs_inode *ni;
INDEX_ENTRY *entry;
void *data;
u16 data_len;
BOOL is_in_root;
INDEX_ROOT *ir;
ntfs_attr_search_ctx *actx;
INDEX_ALLOCATION *ia;
ntfs_attr *ia_na;
VCN ia_vcn;
BOOL ia_dirty;
u32 block_size;
} ntfs_index_context;
extern ntfs_index_context *ntfs_index_ctx_get(ntfs_inode *ni);
extern void ntfs_index_ctx_put(ntfs_index_context *ictx);
extern int ntfs_index_lookup(const void *key, const int key_len,
ntfs_index_context *ictx);
/**
* ntfs_index_entry_mark_dirty - mark an index entry dirty
* @ictx: ntfs index context describing the index entry
*
* Mark the index entry described by the index entry context @ictx dirty.
*
* If the index entry is in the index root attribute, simply mark the inode
* containing the index root attribute dirty. This ensures the mftrecord, and
* hence the index root attribute, will be written out to disk later.
*
* If the index entry is in an index block belonging to the index allocation
* attribute, set ia_dirty to TRUE, thus index block will be updated during
* ntfs_index_ctx_put.
*/
static inline void ntfs_index_entry_mark_dirty(ntfs_index_context *ictx)
{
if (ictx->is_in_root)
ntfs_inode_mark_dirty(ictx->actx->ntfs_ino);
else
ictx->ia_dirty = TRUE;
}
#endif /* _NTFS_INDEX_H */

View File

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2005-02-02.21
scriptversion=2004-12-17.09
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -109,7 +109,7 @@ while test -n "$1"; do
shift
continue;;
--help) echo "$usage"; exit $?;;
--help) echo "$usage"; exit 0;;
-m) chmodcmd="$chmodprog $2"
shift
@ -134,7 +134,7 @@ while test -n "$1"; do
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;;
--version) echo "$0 $scriptversion"; exit 0;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.

View File

@ -38,12 +38,14 @@ libntfs_la_SOURCES = \
attrlist.c \
bitmap.c \
bootsect.c \
collate.c \
compat.c \
compress.c \
debug.c \
device.c \
device_io.c \
dir.c \
index.c \
inode.c \
lcnalloc.c \
logfile.c \

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -98,20 +98,20 @@ libntfs_gnomevfs_la_OBJECTS = $(am_libntfs_gnomevfs_la_OBJECTS)
@ENABLE_GNOME_VFS_TRUE@ $(gnomevfsmoduleslibdir)
libntfs_la_LIBADD =
am_libntfs_la_OBJECTS = attrib.lo attrlist.lo bitmap.lo bootsect.lo \
compat.lo compress.lo debug.lo device.lo device_io.lo dir.lo \
inode.lo lcnalloc.lo logfile.lo mft.lo mst.lo runlist.lo \
security.lo unistr.lo volume.lo
collate.lo compat.lo compress.lo debug.lo device.lo \
device_io.lo dir.lo index.lo inode.lo lcnalloc.lo logfile.lo \
mft.lo mst.lo runlist.lo security.lo unistr.lo volume.lo
libntfs_la_OBJECTS = $(am_libntfs_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libntfs_gnomevfs_la_SOURCES) $(libntfs_la_SOURCES)
DIST_SOURCES = $(libntfs_gnomevfs_la_SOURCES) $(libntfs_la_SOURCES)
@ -127,7 +127,6 @@ ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTODIRS = @AUTODIRS@
AUTOHEADER = @AUTOHEADER@
@ -138,10 +137,6 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@ -153,8 +148,6 @@ EGREP = @EGREP@
ENABLE_GNOME_VFS_FALSE = @ENABLE_GNOME_VFS_FALSE@
ENABLE_GNOME_VFS_TRUE = @ENABLE_GNOME_VFS_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -184,18 +177,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -243,12 +231,14 @@ libntfs_la_SOURCES = \
attrlist.c \
bitmap.c \
bootsect.c \
collate.c \
compat.c \
compress.c \
debug.c \
device.c \
device_io.c \
dir.c \
index.c \
inode.c \
lcnalloc.c \
logfile.c \
@ -380,12 +370,14 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attrlist.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitmap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootsect.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compat.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compress.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/device.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/device_io.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/index.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inode.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lcnalloc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libntfs_gnomevfs_la-gnome-vfs-method.Plo@am__quote@
@ -420,18 +412,18 @@ distclean-compile:
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
libntfs_gnomevfs_la-gnome-vfs-method.lo: gnome-vfs-method.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntfs_gnomevfs_la_CFLAGS) $(CFLAGS) -MT libntfs_gnomevfs_la-gnome-vfs-method.lo -MD -MP -MF "$(DEPDIR)/libntfs_gnomevfs_la-gnome-vfs-method.Tpo" -c -o libntfs_gnomevfs_la-gnome-vfs-method.lo `test -f 'gnome-vfs-method.c' || echo '$(srcdir)/'`gnome-vfs-method.c; \
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntfs_gnomevfs_la_CFLAGS) $(CFLAGS) -MT libntfs_gnomevfs_la-gnome-vfs-method.lo -MD -MP -MF "$(DEPDIR)/libntfs_gnomevfs_la-gnome-vfs-method.Tpo" -c -o libntfs_gnomevfs_la-gnome-vfs-method.lo `test -f 'gnome-vfs-method.c' || echo '$(srcdir)/'`gnome-vfs-method.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libntfs_gnomevfs_la-gnome-vfs-method.Tpo" "$(DEPDIR)/libntfs_gnomevfs_la-gnome-vfs-method.Plo"; else rm -f "$(DEPDIR)/libntfs_gnomevfs_la-gnome-vfs-method.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnome-vfs-method.c' object='libntfs_gnomevfs_la-gnome-vfs-method.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntfs_gnomevfs_la_CFLAGS) $(CFLAGS) -c -o libntfs_gnomevfs_la-gnome-vfs-method.lo `test -f 'gnome-vfs-method.c' || echo '$(srcdir)/'`gnome-vfs-method.c
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntfs_gnomevfs_la_CFLAGS) $(CFLAGS) -c -o libntfs_gnomevfs_la-gnome-vfs-method.lo `test -f 'gnome-vfs-method.c' || echo '$(srcdir)/'`gnome-vfs-method.c
libntfs_gnomevfs_la-gnome-vfs-module.lo: gnome-vfs-module.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntfs_gnomevfs_la_CFLAGS) $(CFLAGS) -MT libntfs_gnomevfs_la-gnome-vfs-module.lo -MD -MP -MF "$(DEPDIR)/libntfs_gnomevfs_la-gnome-vfs-module.Tpo" -c -o libntfs_gnomevfs_la-gnome-vfs-module.lo `test -f 'gnome-vfs-module.c' || echo '$(srcdir)/'`gnome-vfs-module.c; \
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntfs_gnomevfs_la_CFLAGS) $(CFLAGS) -MT libntfs_gnomevfs_la-gnome-vfs-module.lo -MD -MP -MF "$(DEPDIR)/libntfs_gnomevfs_la-gnome-vfs-module.Tpo" -c -o libntfs_gnomevfs_la-gnome-vfs-module.lo `test -f 'gnome-vfs-module.c' || echo '$(srcdir)/'`gnome-vfs-module.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libntfs_gnomevfs_la-gnome-vfs-module.Tpo" "$(DEPDIR)/libntfs_gnomevfs_la-gnome-vfs-module.Plo"; else rm -f "$(DEPDIR)/libntfs_gnomevfs_la-gnome-vfs-module.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnome-vfs-module.c' object='libntfs_gnomevfs_la-gnome-vfs-module.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntfs_gnomevfs_la_CFLAGS) $(CFLAGS) -c -o libntfs_gnomevfs_la-gnome-vfs-module.lo `test -f 'gnome-vfs-module.c' || echo '$(srcdir)/'`gnome-vfs-module.c
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntfs_gnomevfs_la_CFLAGS) $(CFLAGS) -c -o libntfs_gnomevfs_la-gnome-vfs-module.lo `test -f 'gnome-vfs-module.c' || echo '$(srcdir)/'`gnome-vfs-module.c
mostlyclean-libtool:
-rm -f *.lo

156
libntfs/collate.c 100644
View File

@ -0,0 +1,156 @@
/*
* collate.c - NTFS kernel collation handling. Part of the Linux-NTFS project.
*
* Copyright (c) 2004 Anton Altaparmakov
* Copyright (c) 2005 Yura Pakhuchiy
*
* 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
* by the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program/include file is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program (in the main directory of the Linux-NTFS
* distribution in the file COPYING); if not, write to the Free Software
* Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "collate.h"
#include "debug.h"
#include "unistr.h"
static int ntfs_collate_binary(ntfs_volume *vol,
const void *data1, const int data1_len,
const void *data2, const int data2_len)
{
int rc;
ntfs_debug("Entering.");
rc = memcmp(data1, data2, min(data1_len, data2_len));
if (!rc && (data1_len != data2_len)) {
if (data1_len < data2_len)
rc = -1;
else
rc = 1;
}
ntfs_debug("Done, returning %i.", rc);
return rc;
}
static int ntfs_collate_ntofs_ulong(ntfs_volume *vol,
const void *data1, const int data1_len,
const void *data2, const int data2_len)
{
int rc;
u32 d1, d2;
ntfs_debug("Entering.");
if (data1_len != data2_len || data1_len != 4) {
ntfs_error("data1_len or/and data2_len not equal to 4.");
return NTFS_COLLATION_ERROR;
}
d1 = le32_to_cpup(data1);
d2 = le32_to_cpup(data2);
if (d1 < d2)
rc = -1;
else {
if (d1 == d2)
rc = 0;
else
rc = 1;
}
ntfs_debug("Done, returning %i.", rc);
return rc;
}
static int ntfs_collate_file_name(ntfs_volume *vol,
const void *data1, const int data1_len,
const void *data2, const int data2_len) {
int rc;
FILE_NAME_ATTR *fn1, *fn2;
ntfs_debug("Entering.");
fn1 = (FILE_NAME_ATTR *)data1;
fn2 = (FILE_NAME_ATTR *)data2;
rc = ntfs_names_collate(fn1->file_name, fn1->file_name_length,
fn2->file_name, fn2->file_name_length,
NTFS_COLLATION_ERROR, CASE_SENSITIVE, vol->upcase,
vol->upcase_len);
ntfs_debug("Done, returning %i.", rc);
return rc;
}
typedef int (*ntfs_collate_func_t)(ntfs_volume *, const void *, const int,
const void *, const int);
static ntfs_collate_func_t ntfs_do_collate0x0[3] = {
ntfs_collate_binary,
ntfs_collate_file_name,
NULL/*ntfs_collate_unicode_string*/,
};
static ntfs_collate_func_t ntfs_do_collate0x1[4] = {
ntfs_collate_ntofs_ulong,
NULL/*ntfs_collate_ntofs_sid*/,
NULL/*ntfs_collate_ntofs_security_hash*/,
NULL/*ntfs_collate_ntofs_ulongs*/,
};
/**
* ntfs_collate - collate two data items using a specified collation rule
* @vol: ntfs volume to which the data items belong
* @cr: collation rule to use when comparing the items
* @data1: first data item to collate
* @data1_len: length in bytes of @data1
* @data2: second data item to collate
* @data2_len: length in bytes of @data2
*
* Collate the two data items @data1 and @data2 using the collation rule @cr
* and return -1, 0, ir 1 if @data1 is found, respectively, to collate before,
* to match, or to collate after @data2.
*
* For speed we use the collation rule @cr as an index into two tables of
* function pointers to call the appropriate collation function.
*
* Return NTFS_COLLATION_ERROR if error occured.
*/
int ntfs_collate(ntfs_volume *vol, COLLATION_RULES cr,
const void *data1, const int data1_len,
const void *data2, const int data2_len) {
int i;
ntfs_debug("Entering.");
if (!vol || !data1 || !data2 || data1_len < 0 || data2_len < 0) {
ntfs_error("Invalid arguments passed.");
return NTFS_COLLATION_ERROR;
}
/*
* FIXME: At the moment we only support COLLATION_BINARY,
* COLLATION_NTOFS_ULONG and COLLATION_FILE_NAME so we return error
* for everything else.
*/
if (cr != COLLATION_BINARY && cr != COLLATION_NTOFS_ULONG &&
cr != COLLATION_FILE_NAME)
goto err;
i = le32_to_cpu(cr);
if (i < 0)
goto err;
if (i <= 0x02)
return ntfs_do_collate0x0[i](vol, data1, data1_len,
data2, data2_len);
if (i < 0x10)
goto err;
i -= 0x10;
if (i <= 3)
return ntfs_do_collate0x1[i](vol, data1, data1_len,
data2, data2_len);
err:
ntfs_error("Unknown collation rule.");
return NTFS_COLLATION_ERROR;
}

410
libntfs/index.c 100644
View File

@ -0,0 +1,410 @@
/*
* index.c - NTFS index handling. Part of the Linux-NTFS project.
*
* Copyright (c) 2004 Anton Altaparmakov
* Copyright (c) 2005 Yura Pakhuchiy
*
* 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
* by the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program/include file is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program (in the main directory of the Linux-NTFS
* distribution in the file COPYING); if not, write to the Free Software
* Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include "attrib.h"
#include "collate.h"
#include "debug.h"
#include "index.h"
/**
* ntfs_index_ctx_get - allocate and initialize a new index context
* @idx_ni: ntfs inode with which to initialize the context
*
* Allocate a new index context, initialize it with @ni and return it.
* Return NULL if allocation failed.
*/
ntfs_index_context *ntfs_index_ctx_get(ntfs_inode *ni)
{
ntfs_index_context *ictx;
if (!ni) {
errno = EINVAL;
return NULL;
}
if (ni->nr_extents == -1)
ni = ni->base_ni;
ictx = malloc(sizeof(ntfs_index_context));
if (ictx)
*ictx = (ntfs_index_context) {
.ni = ni,
.ia_dirty = FALSE,
};
return ictx;
}
/**
* ntfs_index_ctx_put - release an index context
* @ictx: index context to free
*
* Release the index context @ictx, releasing all associated resources.
*/
void ntfs_index_ctx_put(ntfs_index_context *ictx)
{
if (ictx->entry) {
if (ictx->is_in_root) {
if (ictx->actx)
ntfs_attr_put_search_ctx(ictx->actx);
} else {
/* Write out index block it it's dirty. */
if (ictx->ia_dirty)
if (ntfs_attr_pwrite(ictx->ia_na,
ictx->ia_vcn <<
ictx->ni->vol->cluster_size,
ictx->block_size, ictx->ia) !=
ictx->block_size)
ntfs_error(, "Failed to write out "
"index block.");
/* Free resources. */
free(ictx->ia);
ntfs_attr_close(ictx->ia_na);
}
}
free(ictx);
return;
}
/**
* ntfs_index_lookup - find a key in an index and return its index entry
* @key: [IN] key for which to search in the index
* @key_len: [IN] length of @key in bytes
* @ictx: [IN/OUT] context describing the index and the returned entry
*
* Before calling ntfs_index_lookup(), @ictx must have been obtained from a
* call to ntfs_index_ctx_get().
*
* Look for the @key in the index specified by the index lookup context @ictx.
* ntfs_index_lookup() walks the contents of the index looking for the @key.
*
* If the @key is found in the index, 0 is returned and @ictx is setup to
* describe the index entry containing the matching @key. @ictx->entry is the
* index entry and @ictx->data and @ictx->data_len are the index entry data and
* its length in bytes, respectively.
*
* If the @key is not found in the index, -1 is returned, errno = ENOENT and
* @ictx is setup to describe the index entry whose key collates immediately
* after the search @key, i.e. this is the position in the index at which
* an index entry with a key of @key would need to be inserted.
*
* If an error occurs return -1, set errno to error code and @ictx is left
* untouched.
*
* When finished with the entry and its data, call ntfs_index_ctx_put() to free
* the context and other associated resources.
*
* If the index entry was modified, call ntfs_index_entry_mark_dirty() before
* the call to ntfs_index_ctx_put() to ensure that the changes are written
* to disk.
*/
int ntfs_index_lookup(const void *key, const int key_len,
ntfs_index_context *ictx)
{
COLLATION_RULES cr;
VCN vcn;
ntfs_inode *ni = ictx->ni;
ntfs_volume *vol = ni->vol;
INDEX_ROOT *ir;
INDEX_ENTRY *ie;
INDEX_ALLOCATION *ia = NULL;
u8 *index_end;
ntfs_attr_search_ctx *actx;
ntfs_attr *na = NULL;
int rc, err = 0;
ntfs_debug("Entering.");
if (!key || key_len <= 0) {
errno = EINVAL;
return -1;
}
actx = ntfs_attr_get_search_ctx(ni, NULL);
if (!actx) {
err = ENOMEM;
goto err_out;
}
/* Find the index root attribute in the mft record. */
err = ntfs_attr_lookup(AT_INDEX_ROOT, NULL, 0,
CASE_SENSITIVE, 0, NULL, 0, actx);
if (err) {
if (errno == ENOENT) {
ntfs_error(sb, "Index root attribute missing in inode "
"0x%lx.", ni->mft_no);
err = EIO;
} else
err = errno;
goto err_out;
}
/* Get to the index root value (it has been verified in read_inode). */
ir = (INDEX_ROOT*)((u8*)actx->attr +
le16_to_cpu(actx->attr->value_offset));
index_end = (u8*)&ir->index + le32_to_cpu(ir->index.index_length);
/* Save index block size for future use. */
ictx->block_size = ir->index_block_size;
/* Get collation rule type and validate it. */
cr = ir->collation_rule;
if (!ntfs_is_collation_rule_supported(cr)) {
ntfs_error(sb, "Index uses unsupported collation rule 0x%x. "
"Aborting lookup.", le32_to_cpu(cr));
err = EOPNOTSUPP;
goto err_out;
}
/* The first index entry. */
ie = (INDEX_ENTRY*)((u8*)&ir->index +
le32_to_cpu(ir->index.entries_offset));
/*
* Loop until we exceed valid memory (corruption case) or until we
* reach the last entry.
*/
for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) {
/* Bounds checks. */
if ((u8*)ie < (u8*)actx->mrec || (u8*)ie +
sizeof(INDEX_ENTRY_HEADER) > index_end ||
(u8*)ie + le16_to_cpu(ie->length) > index_end)
goto idx_err_out;
/*
* The last entry cannot contain a key. It can however contain
* a pointer to a child node in the B+tree so we just break out.
*/
if (ie->flags & INDEX_ENTRY_END)
break;
/* Further bounds checks. */
if ((u32)sizeof(INDEX_ENTRY_HEADER) +
le16_to_cpu(ie->key_length) >
le16_to_cpu(ie->data_offset) ||
(u32)le16_to_cpu(ie->data_offset) +
le16_to_cpu(ie->data_length) >
le16_to_cpu(ie->length))
goto idx_err_out;
/* If the keys match perfectly, we setup @ictx and return 0. */
if ((key_len == le16_to_cpu(ie->key_length)) && !memcmp(key,
&ie->key, key_len)) {
ir_done:
ictx->is_in_root = TRUE;
ictx->actx = actx;
ictx->ia = NULL;
done:
ictx->entry = ie;
ictx->data = (u8*)ie +
le16_to_cpu(ie->data_offset);
ictx->data_len = le16_to_cpu(ie->data_length);
ntfs_debug("Done.");
if (err) {
errno = err;
return -1;
}
return 0;
}
/*
* Not a perfect match, need to do full blown collation so we
* know which way in the B+tree we have to go.
*/
rc = ntfs_collate(vol, cr, key, key_len, &ie->key,
le16_to_cpu(ie->key_length));
/*
* If @key collates before the key of the current entry, there
* is definitely no such key in this index but we might need to
* descend into the B+tree so we just break out of the loop.
*/
if (rc == -1)
break;
/*
* A match should never happen as the memcmp() call should have
* cought it, but we still treat it correctly.
*/
if (!rc)
goto ir_done;
/* The keys are not equal, continue the search. */
}
/*
* We have finished with this index without success. Check for the
* presence of a child node and if not present setup @ictx and return
* -1 with errno ENOENT.
*/
if (!(ie->flags & INDEX_ENTRY_NODE)) {
ntfs_debug("Entry not found.");
err = ENOENT;
goto ir_done;
} /* Child node present, descend into it. */
/* Get the starting vcn of the index_block holding the child node. */
vcn = sle64_to_cpup((sle64*)((u8*)ie + le16_to_cpu(ie->length) - 8));
/* We are done with the index root. Release attribute search ctx. */
ntfs_attr_put_search_ctx(actx);
actx = NULL;
/* Open INDEX_ALLOCATION. */
na = ntfs_attr_open(ni, AT_INDEX_ALLOCATION, AT_UNNAMED, 0);
if (!na) {
ntfs_error(sb, "No index allocation attribute but index entry "
"requires one. Inode 0x%lx is corrupt or "
"library bug.", ni->mft_no);
goto err_out;
}
/* Allocate memory to store index block. */
ia = malloc(ictx->block_size);
if (!ia) {
ntfs_error(, "Not enough memory to allocate buffer for index"
" allocation.");
err = ENOMEM;
goto err_out;
}
descend_into_child_node:
/* Read index allocation block. */
if (ntfs_attr_pread(na, vcn << vol->cluster_size_bits, ictx->block_size,
ia) != ictx->block_size) {
ntfs_error(, "Failed to read index allocation.");
goto err_out;
}
/* Catch multi sector transfer fixup errors. */
if (!ntfs_is_indx_record(ia->magic)) {
ntfs_error(sb, "Index record with vcn 0x%llx is corrupt. "
"Corrupt inode 0x%lx. Run chkdsk.",
(long long)vcn, ni->mft_no);
goto err_out;
}
if (sle64_to_cpu(ia->index_block_vcn) != vcn) {
ntfs_error(sb, "Actual VCN (0x%llx) of index buffer is "
"different from expected VCN (0x%llx). Inode "
"0x%lx is corrupt or driver bug.",
(unsigned long long)
sle64_to_cpu(ia->index_block_vcn),
(unsigned long long)vcn, ni->mft_no);
goto err_out;
}
if (le32_to_cpu(ia->index.allocated_size) + 0x18 != ictx->block_size) {
ntfs_error(sb, "Index buffer (VCN 0x%llx) of inode 0x%lx has "
"a size (%u) differing from the index "
"specified size (%u). Inode is corrupt or "
"driver bug.", (unsigned long long)vcn,
ni->mft_no,
le32_to_cpu(ia->index.allocated_size) + 0x18,
ictx->block_size);
goto err_out;
}
index_end = (u8*)&ia->index + le32_to_cpu(ia->index.index_length);
if (index_end > (u8*)ia + ictx->block_size) {
ntfs_error(sb, "Size of index buffer (VCN 0x%llx) of inode "
"0x%lx exceeds maximum size.",
(unsigned long long)vcn, idx_ni->mft_no);
goto err_out;
}
/* The first index entry. */
ie = (INDEX_ENTRY*)((u8*)&ia->index +
le32_to_cpu(ia->index.entries_offset));
/*
* Iterate similar to above big loop but applied to index buffer, thus
* loop until we exceed valid memory (corruption case) or until we
* reach the last entry.
*/
for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) {
/* Bounds checks. */
if ((u8*)ie < (u8*)ia || (u8*)ie +
sizeof(INDEX_ENTRY_HEADER) > index_end ||
(u8*)ie + le16_to_cpu(ie->length) > index_end) {
ntfs_error(sb, "Index entry out of bounds in inode "
"0x%lx.", ni->mft_no);
goto err_out;
}
/*
* The last entry cannot contain a key. It can however contain
* a pointer to a child node in the B+tree so we just break out.
*/
if (ie->flags & INDEX_ENTRY_END)
break;
/* Further bounds checks. */
if ((u32)sizeof(INDEX_ENTRY_HEADER) +
le16_to_cpu(ie->key_length) >
le16_to_cpu(ie->data_offset) ||
(u32)le16_to_cpu(ie->data_offset) +
le16_to_cpu(ie->data_length) >
le16_to_cpu(ie->length)) {
ntfs_error(sb, "Index entry out of bounds in inode "
"0x%lx.", ni->mft_no);
goto err_out;
}
/* If the keys match perfectly, we setup @ictx and return 0. */
if ((key_len == le16_to_cpu(ie->key_length)) && !memcmp(key,
&ie->key, key_len)) {
ia_done:
ictx->is_in_root = FALSE;
ictx->actx = NULL;
ictx->ia = ia;
ictx->ia_vcn = vcn;
ictx->ia_na = na;
goto done;
}
/*
* Not a perfect match, need to do full blown collation so we
* know which way in the B+tree we have to go.
*/
rc = ntfs_collate(vol, cr, key, key_len, &ie->key,
le16_to_cpu(ie->key_length));
/*
* If @key collates before the key of the current entry, there
* is definitely no such key in this index but we might need to
* descend into the B+tree so we just break out of the loop.
*/
if (rc == -1)
break;
/*
* A match should never happen as the memcmp() call should have
* cought it, but we still treat it correctly.
*/
if (!rc)
goto ia_done;
/* The keys are not equal, continue the search. */
}
/*
* We have finished with this index buffer without success. Check for
* the presence of a child node and if not present return ENOENT.
*/
if (!(ie->flags & INDEX_ENTRY_NODE)) {
ntfs_debug("Entry not found.");
err = ENOENT;
goto ia_done;
}
if ((ia->index.flags & NODE_MASK) == LEAF_NODE) {
ntfs_error(sb, "Index entry with child node found in a leaf "
"node in inode 0x%lx.", idx_ni->mft_no);
goto err_out;
}
/* Child node present, descend into it. */
vcn = sle64_to_cpup((sle64*)((u8*)ie + le16_to_cpu(ie->length) - 8));
if (vcn >= 0)
goto descend_into_child_node;
ntfs_error(sb, "Negative child node vcn in inode 0x%lx.", ni->mft_no);
err_out:
if (na)
ntfs_attr_close(na);
if (ia)
free(ia);
if (!err)
err = EIO;
if (actx)
ntfs_attr_put_search_ctx(actx);
errno = err;
return -1;
idx_err_out:
ntfs_error(sb, "Corrupt index. Aborting lookup.");
goto err_out;
}

3348
ltmain.sh

File diff suppressed because it is too large Load Diff

16
missing
View File

@ -1,9 +1,9 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2005-02-08.22
scriptversion=2004-09-07.08
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
@ -87,12 +87,12 @@ Supported PROGRAM values:
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit $?
exit 0
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
exit 0
;;
-*)
@ -288,14 +288,10 @@ WARNING: \`$1' is $msg. You should only need it if
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;

View File

@ -1,7 +1,7 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2005-02-02.21
scriptversion=2004-02-15.20
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
@ -27,7 +27,7 @@ while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
exit 0
;;
-m) # -m PERM arg
shift
@ -37,7 +37,7 @@ while test $# -gt 0 ; do
;;
--version)
echo "$0 $scriptversion"
exit $?
exit 0
;;
--) # stop option processing
shift

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -132,7 +132,7 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
@ -162,7 +162,6 @@ ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTODIRS = @AUTODIRS@
AUTOHEADER = @AUTOHEADER@
@ -173,10 +172,6 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@ -188,8 +183,6 @@ EGREP = @EGREP@
ENABLE_GNOME_VFS_FALSE = @ENABLE_GNOME_VFS_FALSE@
ENABLE_GNOME_VFS_TRUE = @ENABLE_GNOME_VFS_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -219,18 +212,13 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@