Commit Graph

317 Commits (2acadfd3605214b8adeb0a1d12a3a983a8af1871)

Author SHA1 Message Date
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 f893a421c2 Removed libntfs-specific sources. 2010-12-02 16:37:09 +01:00
Yura Pakhuchiy 2b1ef811e6 Add NTFS_MNT_INTERIX mount option to make libntfs recognize Interix files.
At present it influence only on ntfs_filldir(), but we can have ntfs_stat() and
other functions on which it will make more influence later.
2007-09-27 15:58:42 +03:00
Yura Pakhuchiy 1b5fb2693c Introduce NTFS_ON_DEBUG macro to add one-liners which would be executed only if DEBUG is defined.
And use it to shut up valgrind crying about writing of unitialized buffer (we do not initialize part of attribute list left for padding)
2007-09-24 19:21:16 +03:00
Yura Pakhuchiy 673c23d74a libntfs: Cache opened attributes. 2007-09-20 15:35:43 +03:00
Yura Pakhuchiy c0e8e211f3 libntfs: Cache opened inodes. 2007-09-20 14:00:55 +03: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 e248e6b986 Make libntfs keep track number of free clusters and MFT records.
Thanks for idea to David Fox and Szabolcs Szakacsits.
2007-09-14 12:59:55 +03:00
Yura Pakhuchiy 9cd3246db7 cleanup 2007-09-11 20:56:34 +03:00
Yura Pakhuchiy 82df6c1fea Rework time updates
- Library no longer perform time updates, only provide API for this
- Remove ntfs_inode_update_{a,}time() and introduce ntfs_inode_update_times()
- Make ntfsmount properly update times
- ntfs_delete() now takes pointer to pointer to ntfs_inode for while to delete and closes inode only in cases no more hard links left to file
2007-09-06 18:34:38 +03:00
Yura Pakhuchiy 4679daa0af Fix hole instantiating and new API ntfs_rl_fill_zero
Thanks to Szaka for finding this bug and idea of factoring out zero filling code.
2007-09-05 16:38:51 +03:00
Yura Pakhuchiy 65a81e3563 ntfsclone do bad things about endians, so revert it to original state and put mark on it to not perform sparse bitwise checks 2007-08-23 17:58:52 +03:00
Yura Pakhuchiy f5a2ae79a9 Improve endian self-test per discussion with Anton. 2007-08-23 17:39:00 +03:00
Yura Pakhuchiy c0b691ca17 Merge --enable-debug and --enable-debug-logging. Introduce --enable-sparse. 2007-08-22 21:29:19 +03:00
Yura Pakhuchiy 391929cff3 Export NTFS_EFS string 2007-08-22 19:31:24 +03:00
Yura Pakhuchiy 4b58df6817 New API: ntfs_attr_get_name
Add new API ntfs_attr_get_name - returns pointer to unicode name of attribute.

TODO: I believe we have several such local helpers in ntfsprogs and libntfs.
Find and replace them with this one.
2007-08-22 19:28:44 +03:00
Yura Pakhuchiy ad0c5f59c9 Transparently integrate reading of encrypted files into library
This adds crypto.[ch], several exported functions that you are not interested
to use and dependency on >=libconfig-1.0.1 to read list of PFX files with keys.
See libntfs/config for example configuration file.
2007-08-22 16:55:57 +03:00
Yura Pakhuchiy 87b686f9c9 Undef __bitwise and __force in case someone else defined them before us 2007-07-21 15:13:57 +03:00
Yura Pakhuchiy 1947aacb89 Cleanup 2007-07-01 01:52:48 +03:00
Yura Pakhuchiy 7a68bb3ea0 Endian fixes for gnome-vfs module. Thanks to Anton for tip. 2007-06-10 14:30:41 +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
Yura Pakhuchiy def36146b7 Sparse 0.3 do not longer requires this workaround! 2007-06-08 13:46:10 +03:00
Yura Pakhuchiy b99d331f78 We do not need to map whole runlist in this case, only until @pos. Introduce ntfs_attr_map_runlist_range to implement this. 2007-06-08 13:41:10 +03:00
Yura Pakhuchiy e6620be16d Do not create holes in ntfs_attr_pwrite that will be instantiated right after creation
* Add new API: __ntfs_attr_truncate that allow user to select whether holes should be created or clusters allocated
* Update ntfs_attr_pwrite and ntfscp to use it.
2007-06-08 13:35:47 +03:00
aia21 f6adc3fc78 - mkntfs: Create more Vista like volumes. We now match the security
descriptor attributes (but not yet the security descriptors stored in
  $Secure).  (Anton)
- libntfs: Rewrite ntfs_upcase_table_build() to generate a Vista
  compatible upcase table ($UpCase).  (Anton)
- mkntfs: Remove own generation of upcase table, i.e. delete
  ntfsprogs/upcase.[ch] and use ntfs_upcase_table_build() supplied by
  libntfs.  (Anton)
2006-12-19 16:31:52 +00:00
aia21 1a4fb3431c - mkntfs: Generate a random DCE compliant UUID for the created volume
and include --with-uuid[=PFX] and --without-uuid options.  (Anton)
- configure.ac: Set language to C.  (Anton)
- mkntfs: Always set default cluster size to 4096 bytes regardless of
  volume size.  This is what Windows Vista does and it makes perfect
  sense from a performance point of view.  (Anton)
2006-12-13 00:11:50 +00:00
yura 914cf8f2be Workaround for this bogus s64 warnings. Thanks, Linus! 2006-12-12 20:27:32 +00:00
yura 7b60afcc2f fix sparse errors. and first steps towards endianness checking 2006-12-12 15:02:25 +00:00
yura 2b611a1461 fix clusters per index block calculation (Szaka) 2006-12-11 03:16:22 +00:00
yura 19089b08bd one place with mount option description 2006-12-11 03:03:30 +00:00
yura 03fabce6eb o fix magicNTFS defenition
o remove NTFS_SB_MAGIC because it is unusefull
o rename magicNTFS -> NTFS_SB_MAGIC
o make bootsect.c use NTFS_SB_MAGIC instead of hardcoded value
2006-12-11 03:02:23 +00:00
aia21 8640540b53 Warn about VOLUME_MOUNTED_ON_NT4 wrt Vista in layout.h and do not set the flag
in ntfsfix.
2006-12-09 11:27:37 +00:00
yura c475778b47 Turn ntfs_pathname_to_inode() into ntfs_pathname_to_inode_num() which
returns ntfs inode number instead of opened inode itself.
Reimplement ntfs_pathname_to_inode() as wrapper to new API.
2006-12-06 18:50:13 +00: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 8df298aec2 Introduce MNT_NTFS_NOT_EXCLUSIVE mount option that tells libntfs do
not open volume exclusively. Useful if libntfs user cares about this
himself, eg. FUSE with blkdev option.
2006-11-25 17:37:37 +00:00
yura cb27c9f616 * Rename MS_{RDONLY,NOATIME} to NTFS_MNT_{RDONLY,NOATIME}.

							
						
2006-11-12 22:46:50 +00:00
yura f2e1ff96d2 Spent really a lot of time applying various "optimizations" from ntfs-3g and
finally figured out that ntfs-3g is faster than ntfsmount only because of
3 reasons:
1) turned on noatime option by default
2) ntfs-3g builds without debug output by default
3) the only real optimization: almost always add resident attributes.
However by accident patch in ntfs-3g for 3) breaks several code paths (why
I am not surprised?), thus I rewrote whole ntfs_attr_add() logic.
2006-11-09 21:19:11 +00:00
uvman 1598a68d67 Fix compilation on environments that one can not assign to "va_list args" (e.g. Debian Alpha). Do so by removing the unused log_reason code. Originally, Szaka asked FlatCap for it but never used it. I've asked Szaka if he is going to use it but he did not reply. I got an implicit answer in the form of ntfs-3g commit. Therefore, commit an updated version of the patch I've sent the Debian package maintainer. 2006-11-01 14:05:09 +00:00
uvman 7d585a0327 Change callers of malloc() to ntfs_malloc() (Szaka). Fix compilition (Yuval). 2006-11-01 13:30:40 +00:00
uvman 483522ec1f Introduce misc.c - Proud home of functions with no other home, starting with ntfs_[mc]alloc. (Szaka) 2006-11-01 12:31:11 +00:00
uvman 561cb42743 Move ntfs_index_entry_mark_dirty() from index.h to index.c. (Szaka) 2006-10-29 00:55:45 +00:00
uvman fe1405393f Change ntfs_collate()'s signature to size_t's. Move ntfs_is_collation_rule_supported to the .c file and rewrite it to be shorter. 2006-10-29 00:01:17 +00:00
uvman b8ecbf7b94 Spelling fix. 2006-10-28 23:46:30 +00:00
uvman 87d87073c7 The periodic 'int is not neccessarily 32bit' fixes. 2006-10-28 23:45:22 +00:00
uvman 2991c40d90 Remove double-commenting. Why use C++-style comments for multilines anyway? 2006-10-28 23:11:25 +00:00
uvman ff55ecb513 Whitespace cleanup 2006-10-27 12:24:29 +00:00
aia21 8ddea064b9 Revert 1.13 commit from Yuval: Gratuitous API/ABI change. 2006-10-27 09:04:08 +00:00
uvman ca2fb9a467 Remove inline keywords from static non-one-liners of '.c' files. 2006-10-26 19:10:05 +00:00
aia21 3d56b14bca fix a packing bug 2006-10-20 19:54:22 +00:00
aia21 0c86fccdc9 Fix GUID to string conversion to follow documentation (details: it is not
little endian at all, it is a binary sequence)...

See remarks section at:

http://windowssdk.msdn.microsoft.com/en-us/library/96ff78dc.aspx
2006-10-10 10:29:11 +00:00