Commit Graph

776 Commits (36af29fe721aabe7ced8ef01dcab3ffc53c047eb)

Author SHA1 Message Date
Yura Pakhuchiy 673c23d74a libntfs: Cache opened attributes. 2007-09-20 15:35:43 +03:00
Yura Pakhuchiy 038fea1b5b Cleanup
We calloc() buffer for attribute, but better always set na->crypto to NULL
explicitly just for any case
2007-09-20 14:21:58 +03:00
Yura Pakhuchiy c0e8e211f3 libntfs: Cache opened inodes. 2007-09-20 14:00:55 +03:00
Yura Pakhuchiy dc4e093df0 Fix stupidness because of which we always wrote out MFT record on close 2007-09-18 23:08:21 +03:00
Yura Pakhuchiy d6dc40150f formatting 2007-09-18 22:57:19 +03:00
Yura Pakhuchiy e5690b57d4 Allow mounting volumes with non-clean logfile with force mount option.
Volume left dirty upon umount. So, this is equal to running ntfsfix and then mounting with force option.
2007-09-16 00:15:46 +03:00
Yura Pakhuchiy bf3a7442eb ntfs_attr_pwrite: Write 4096 bytes blocks when possible. (David Fox, Szaka, Anton, Yura) 2007-09-15 23:09:20 +03:00
Yura Pakhuchiy 57cc7904c9 cleanups (Szaka) 2007-09-15 17:31:39 +03:00
Yura Pakhuchiy 5e4341c0ac Do not refuse mount if there is garbadge in hiberfil.sys file. (Szabolcs Szakacsits) 2007-09-14 13:09:14 +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 f5b9888eb6 formatting 2007-09-13 23:05:18 +03:00
Yura Pakhuchiy e9f9d9905f Cleanup 2007-09-13 16:07:48 +03:00
Yura Pakhuchiy 3b99cee600 Fix directory corruption in index code. (Szaka)
TODO/FIXME: This hardly readable code definitely needs rewrite. Take index.c from 1.13.1 and implement all properly.
2007-09-11 16:58:01 +03:00
Yura Pakhuchiy cc166f9f42 ntfs_readdir, ntfs_fuse_filler: return with error if FUSE filler failed. (Szaka) 2007-09-10 21:21:39 +03:00
Yura Pakhuchiy a1103ccd61 Fix syslog logging handler to take in respect all logging flags.
This makes ntfs_log_perror, ntfs_log_trace, etc., behave correctly when
beeing used with it.
2007-09-10 18:38:29 +03:00
Yura Pakhuchiy 54d7899368 Workaround windows defragmentation tool bug.
Windows defragmentation tool do not update name offset correctly for unnamed
attributes, but chkdsk do not like when it negative, so do not change it at all
if it would become negative.  (Szaka)
2007-09-07 15:50:29 +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 a1124ce7f4 Fix recent denial of __ntfs_create in reparse point 2007-09-06 18:11:53 +03:00
Yura Pakhuchiy 9f51bdfd05 Catch and deny all junction/reparse point write operations. (Szaka) 2007-09-05 21:19:53 +03:00
Yura Pakhuchiy 7d6a8f2767 ntfs_ie_add(): cleanup (Szaka) 2007-09-05 21:00:16 +03:00
Yura Pakhuchiy aec646eebc Do not force debug output to be always shown even if --enable-debug specifiend during configure. Let user choose in runtime. 2007-09-05 16:47:03 +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 219d353226 Fix corner case in hole instantiating in ntfs_attr_pwrite(). (Szaka) 2007-09-04 17:20:13 +03:00
Yura Pakhuchiy 95b044cff3 Small enchantments and cleanups from ntfs-3g 2007-09-03 19:51:13 +03:00
Yura Pakhuchiy 3b64a5a512 trailing spaces 2007-09-03 19:39:24 +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 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 09affc5d42 Whitespaces cleanup 2007-07-31 20:52:36 +03:00
Yura Pakhuchiy ea4d352f7e Fix sparse warnings from git HEAD version 2007-07-21 22:01:57 +03:00
Yura Pakhuchiy 311ecc507e Memleak 2007-07-21 15:11:42 +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 48c336fd6a O(1) mapping pairs update for normal files 2007-06-08 13:45:28 +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 e404ce8203 Fix 64bit warnings (Yuval) 2007-06-08 13:36:37 +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
yura 48399b98b3 cleanup 2007-03-13 18:45:51 +00: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
yura 3c668b7d03 - O_EXCL already handled by MNT_NOT_EXCLUSIVE at more early stage
- fix comments
2006-12-15 17:00:02 +00:00
aia21 1fa522a0a1 - libntfs: Add support for FreeBSD 5.0+ sector aligned access
requirements.  (Max Khon)

With some modifications from me...
2006-12-15 15:21:27 +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 10b22550cd more sparse fixes
left only endianness and this stupid problems with s64
2006-12-12 19:00:00 +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 43b61b82e7 If pread/pwrite are not supported by the OS, set the device pread()/pwrite()
pointers to NULL so we automatically use seek() + read()/write() from now on.
2006-12-10 19:38:02 +00:00
aia21 f73d77d568 - Implement ntfs_pread() and ntfs_pwrite() in terms of device
operations pread() and pwrite() respectively and fall back to using
  seek() + read()/write() if no pread()/pwrite() device operation is
  supplied or the OS does not support the pread()/pwrite() system call.
  Adapt unix_io pread()/pwrite() device operations to use pread()/
  pwrite() system call and adapt win32_io device operations to not
  supply pread()/pwrite().  (Csaba Henk, Anton)
2006-12-09 14:01:12 +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