Commit Graph

47 Commits

Author SHA1 Message Date
Jean-Pierre André
8e01e1ed65 Fixed a wrong fallthrough situation in ntfscat
A fallthrough situation was not intentional.
2020-03-08 09:42:15 +01:00
Erik Larsson
9893ea9ee6 Merge endianness fixes.
Conflicts:
	libntfs-3g/attrib.c
2016-01-28 09:22:42 +01:00
Erik Larsson
dfa4a6647f Fix code to use const_cpu_to_X/const_X_to_cpu macros for constants.
This enables the compiler to optimize this code in cases where compiler
support for endianness swapping is not present.
2015-12-21 23:21:00 +01:00
Jean-Pierre André
4340df770e Supported the directory separator on Windows in ntfsprogs (cosmetic)
On Windows, when an ntfsprogs utility requests a path translation,
translate the '\'s to '/'s so that only '/' have to be interpreted
in libntfs.
2015-04-17 09:15:25 +02:00
Jean-Pierre André
c0287870e1 Returned success from ntfsprogs utilities with options --version and --help
The ntfsprogs used to return failure when option --version or --help
was used, and this has triggered complains from distribution packagers
who use these options in packaging scripts.
With this patch, success is returned (same behavior as gcc).
2014-04-23 10:13:27 +02:00
Erik Larsson
7506d8b80b Rename legacy MS_* flags for ntfs_mount with NTFS_MNT_* flags.
The MS_* flags originated from system constants. However the flags
passed to ntfs_mount were really unrelated to the system constants and
many new MS_* flags had to be introduced as different features were
added to the library. Those flags had no counterparts in any system
APIs, so using the same naming scheme is inappropriate.

Instead, let's namespace these flags similarly to what has already been
done in ntfsprogs/libntfs earlier. This avoids any possible conflicts
with system constants.
The values of the flags themselves are kept the same as earlier, so
backward compatibility is retained.
2012-11-07 16:29:48 +01:00
Erik Larsson
c3e651047a Replaced some usages of ntfs_mbstoucs_libntfscompat with ntfs_mbstoucs.
Some calls to ntfs_mbstoucs_libntfscompat were unnecessary as they only used
functionality that can be provided by ntfs_mbstoucs.
2011-09-13 09:51:55 +02:00
Erik Larsson
bcdc76f12d Merge remote branch 'linux-ntfs/libntfs-3g_port-v2_0_0' into PERMISSION_HANDLING_BRANCH
Conflicts:
	.cvsignore
	AUTHORS
	CREDITS
	ChangeLog
	NEWS
	README
	TODO.libntfs
	autogen.sh
	configure.ac
	include/ntfs/Makefile.am
	libntfs-3g/misc.c
	libntfs/Makefile.am
	libntfs/gnome-vfs-method.c
	libntfs/gnome-vfs-module.c
	ntfsprogs.spec.in
	ntfsprogs/.cvsignore
	ntfsprogs/mkntfs.c
	ntfsprogs/ntfscat.8.in
	ntfsprogs/ntfsclone.c
	ntfsprogs/ntfscp.8.in
	ntfsprogs/ntfsinfo.c
	ntfsprogs/ntfsprogs.8.in
	ntfsprogs/ntfsresize.c
	ntfsprogs/ntfsrm.c
	ntfsprogs/ntfsundelete.h
	ntfsprogs/upcase.c
	ntfsprogs/utils.c
	test/Makefile.am
2010-12-17 09:04:01 +01:00
Erik Larsson
16dbcbec0c Restored 'local' includes for all the ntfsprogs instead of using system includes (e.g. #include "yada.h" instead of #include <ntfs-3g/yada.h>). 2010-12-16 09:59:42 +01:00
Erik Larsson
18789cdeaa Replaced all occurrences of the libntfs mount flag NTFS_MNT_FORCE with the libntfs-3g mount flag MS_RECOVER.
Note: The NTFS_MNT_FORCE, in addition to what MS_RECOVER does, also bypasses the check for the 'dirty' bit in libntfs' ntfs_mount.
However, this check does not exist in libntfs-3g (libntfs-3g will not check or change the dirty bit, being confident that it can handle volumes marked as 'dirty'), so in essence the same behaviour is achieved with MS_RECOVER.
2010-12-02 22:37:06 +01:00
Erik Larsson
6ff5d3f8a7 Replaced all occurrences of the libntfs mount flag NTFS_MNT_RDONLY with the corresponding libntfs-3g mount flag MS_RDONLY. 2010-12-02 22:36:58 +01:00
Erik Larsson
713fbb390e Merge commit 'v2_0_0' into libntfs-3g_port-v2_0_0
Conflicts:
	configure.ac
	include/ntfs/Makefile.am
	include/ntfs/attrib.h
	include/ntfs/bitmap.h
	include/ntfs/collate.h
	include/ntfs/debug.h
	include/ntfs/dir.h
	include/ntfs/endians.h
	include/ntfs/index.h
	include/ntfs/inode.h
	include/ntfs/layout.h
	include/ntfs/logfile.h
	include/ntfs/logging.h
	include/ntfs/mft.h
	include/ntfs/ntfstime.h
	include/ntfs/runlist.h
	include/ntfs/support.h
	include/ntfs/types.h
	include/ntfs/unistr.h
	include/ntfs/volume.h
	libntfs/Makefile.am
	libntfs/attrib.c
	libntfs/attrlist.c
	libntfs/bitmap.c
	libntfs/bootsect.c
	libntfs/collate.c
	libntfs/compress.c
	libntfs/debug.c
	libntfs/device.c
	libntfs/device_io.c
	libntfs/dir.c
	libntfs/index.c
	libntfs/inode.c
	libntfs/lcnalloc.c
	libntfs/logfile.c
	libntfs/logging.c
	libntfs/mft.c
	libntfs/mst.c
	libntfs/runlist.c
	libntfs/security.c
	libntfs/unistr.c
	libntfs/unix_io.c
	libntfs/volume.c
	libntfs/win32_io.c
	ntfsprogs/Makefile.am
	ntfsprogs/mkntfs.c
	ntfsprogs/ntfscat.c
	ntfsprogs/ntfsclone.c
	ntfsprogs/ntfscmp.c
	ntfsprogs/ntfscp.c
	ntfsprogs/ntfsinfo.c
	ntfsprogs/ntfsmount.8.in
	ntfsprogs/ntfsmount.c
	ntfsprogs/ntfsundelete.c
	ntfsprogs/upcase.c
2010-12-02 22:31:21 +01:00
Erik Larsson
5b9b4c7e49 Removing all references to the libntfs library version until we have such functionality in libntfs-3g. 2010-12-02 16:38:16 +01:00
Erik Larsson
b538215ddb Replaced all occurrences of ntfs_mbstoucs with a compatibility wrapper function (ntfs_mbstoucs_libntfscompat).
The interface and semantics of ntfs_mbstoucs differ between libntfs and libntfs-3g, so this compatibility wrapper tries to address the differences.
2010-12-02 16:05:22 +01:00
Erik Larsson
f03d683fa0 Commented out all references to 'version.h' (which doesn't exist in libntfs-3g) and added a stub implementation of ntfs_libntfs_version in utils.h to allow things to compile. 2010-12-02 15:58:14 +01:00
Erik Larsson
1860eff1da Updated all includes in the basic ntfsprogs utilities for libntfs-3g. 2010-12-02 15:57:58 +01:00
Yura Pakhuchiy
37476cf609 Introduce NTFS_MNT_FORCE instead of third parameter of utils_mount_volume 2007-09-15 18:12:32 +03:00
Yura Pakhuchiy
0d264b7d25 Introduce sparse endian annotations. Adopt library (also fix 2 real bugs) and progs (lots of bugs). 2007-06-08 13:47:57 +03:00
aia21
5302d23f7b - Empty the journal at mount time. (Anton)
- Set the volume dirty bit at mount time (if it is not set already and
  clear it again at umount time but only if it was not set to start
  with.  (Anton)
2006-11-28 10:09:56 +00:00
yura
cb27c9f616 * Rename MS_{RDONLY,NOATIME} to NTFS_MNT_{RDONLY,NOATIME}.
* Introduce NTFS_MNT_CASE_SENSITIVE.
2006-11-12 22:46:50 +00:00
szaka
c7a53338c0 Fix all incorrect getopt_long() return value usages. 2006-04-05 12:43:06 +00:00
szaka
0887a0e261 Update a few copyrights 2006-03-29 22:54:22 +00:00
flatcap
af6f7606e4 tidy evil roff usage
add/document missing options
add missing authors
standardise program usage()
standardise options look
update download and contact details
2005-11-21 21:25:14 +00:00
flatcap
aa3807bc27 upgrade to use new logging
(all logging to stderr)
2005-10-28 18:59:29 +00:00
flatcap
8aa6d76741 more evil spaces 2005-10-28 04:41:54 +00:00
flatcap
8a584700c5 whitespace fixes - no code changes 2005-10-26 22:54:57 +00:00
szaka
9be56ad848 ntfscat can display named attributes, streams too 2005-10-23 14:00:37 +00:00
flatcap
f4e427e91a implement logging in libntfs
fix whitespace
fix build problems
tidy source code
and more...
2005-10-21 18:05:13 +00:00
antona
0c293d0407 - Add API (actually renamed from what Rich/FlatCap did):
volume.[hc]::ntfs_libntfs_version() which returns a pointer to a
  static const string of the libntfs verion, i.e. at the moment this is
  "8.0.0".  This required moving the version specifications from
  libntfs/Makefile.am to configure.ac.  This should hopefully have the
  sideeffect that I will remember to increment it when incrementing the
  ntfsprogs version number when making a release given the two are
  right under one another.  (Anton)
- Change ALL utilities to display the libntfs version they are running
  on.  This should make debugging easier in the case that people are
  running mismatched utilities/library.  (Anton)
2005-10-07 14:10:56 +00:00
antona
8db479a6b1 Patch from Christophe:
A lot of headers are checked by autoconf (AC_CHECK_HEADERS in configure.ac).
Please find a patch that add the missing "#ifdef" to the source code.
2005-09-28 13:47:47 +00:00
antona
6124aafffb Move timeconv to ntfstime, update changelog, and news for new release. 2005-08-04 09:59:39 +00:00
flatcap
0e364b49aa ntfscat now works with attribute names
ntfscat now removes fixup from:
  $MFT/$DATA
  $MFTMirr/$DATA
  anydir/$INDEX_ALLOCATION
2005-06-20 14:24:53 +00:00
flatcap
949043ab36 Tidy whitespace: trailing space; <space><tab> at the beginning of lines
Fix warnings about sign differences
Fix warnings about unused parameters
Tidy a few functions that didn't have { on a new line
2005-06-19 21:09:40 +00:00
cha0smaster
e323ed6a03 Move utils_pathname_to_inode from to library (dir.c), adapt it for library, rename it to ntfs_pathname_to_inode, update all users. 2005-06-12 18:12:55 +00:00
!uv
43b262ad58 Warning fix: shadowing a global variable.
(Logical change 1.508)
2004-08-20 12:30:34 +00:00
flatcap.org!ntfs
a61808707f minor build fix
(Logical change 1.494)
2004-08-12 13:33:25 +00:00
cantab.net!aia21
3423a8a909 Rename uchar_t to ntfschar.
(Logical change 1.392)
2004-05-14 13:02:33 +00:00
cantab.net!aia21
123b1028ec Fix lots of warnings about no prototypes by adding
the 'static' keyword.  (Yuval)

(Logical change 1.381)
2004-04-23 13:55:49 +00:00
cantab.net!aia21
71c1fe3af8 Update
(Logical change 1.374)
2004-04-16 20:54:34 +00:00
elisa-laajakaista.fi!szaka
8c67ce1c36 Fix incorrect getopt_long() usage: converted argv[optind-1] to optarg
so utilities won't do bogus and unexpected things

(Logical change 1.366)
2004-04-15 00:42:33 +00:00
cantab.net!aia21
9193cb6298 Update
Fix warnings on powerpc architecture where it would seem char is
unsigned so comparisons with -1 cause a warning that comparison is
always true/wrong.  (Thanks to Ender for reporting.)

(Logical change 1.324)
2004-03-12 09:30:03 +00:00
cantab.net!aia21
6636c33a6d Fix signed/unsigned warnings.
2004/01/06 11:56:52+00:00 cantab.net!aia21
Add attribute and inode options to ntfscat (Szaka, modified by me).

2003/11/13 14:52:41+00:00 cantab.net!aia21
Merge

2003/10/28 15:50:53+00:00 flatcap.org!ntfs
prepare to cat other attributes

(Logical change 1.299)
2004-03-06 17:42:28 +00:00
cantab.net!aia21
0cef8dcd86 Make ntfscat show all messages to stderr so output (on stdout) isn't corrupted. (Szaka)
(Logical change 1.234)
2003-11-13 14:51:43 +00:00
cantab.net!aia21
b44276e3f1 Add -quiet and -verbose options to ntfscat.
(Logical change 1.209)
2003-10-17 15:43:14 +00:00
flatcap.org!ntfs
9e26482dd5 mem leak in error path
(Logical change 1.201)
2003-10-11 21:47:38 +00:00
flatcap.org!ntfs
f28338e40c Initial revision 2003-10-10 23:22:23 +00:00
flatcap.org!ntfs
cfacfc10a5 (Logical change 1.195) 2003-10-10 23:22:23 +00:00