Commit Graph

99 Commits (1b5fb2693cc59c071edb627ee2d952e83d473543)

Author SHA1 Message Date
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 dcf72f1315 ntfs_inode_close: Document that @ni can be NULL. 2007-09-21 18:43:05 +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 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 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 311ecc507e Memleak 2007-07-21 15:11:42 +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 668780d84d bot more verbose debug 2006-11-25 14:28:47 +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 7d585a0327 Change callers of malloc() to ntfs_malloc() (Szaka). Fix compilition (Yuval). 2006-11-01 13:30:40 +00:00
uvman ff55ecb513 Whitespace cleanup 2006-10-27 12:24:29 +00:00
uvman ca2fb9a467 Remove inline keywords from static non-one-liners of '.c' files. 2006-10-26 19:10:05 +00:00
uvman 7b6f7e98d4 Remove saving and restoring errno around logging calls as these will not change errno anyway. Remove save/restore only if the saved value will not be used. 2006-10-22 00:23:29 +00:00
uvman 9efb57918f Fix a logic error that made 'ls -ls' show the wrong file size for compressed and sparse files. 2006-07-21 22:04:44 +00:00
yura 28a2b1f2b0 prepare to Szaka's code merge: remove not working Rich's index code 2006-07-17 11:49:52 +00:00
szaka 134319ae80 libntfs: add and ntfs_inode_badclus_bad() and convert all copy-pastes
to use them
2006-04-05 02:53:40 +00:00
szaka b5f4182861 Add some important debugging, tracing info 2006-02-09 21:40:00 +00:00
cha0smaster 2bc1f13f99 fix stupid bug in / filename syncing. reenable atime updates for /. 2005-11-18 16:18:18 +00:00
cha0smaster a55ac531e4 typo fix. Thanks Yuval. 2005-11-18 15:56:31 +00:00
cha0smaster 2367a06b6e Rework time updates, more close to like windows does. Still do not update for / because of sync problems. 2005-11-17 18:00:58 +00:00
cha0smaster a732881c5e see changelog 2005-11-07 20:37:07 +00:00
cha0smaster 300f86ac21 * layout.h: update about special INTX files.
* ntfsmount: implement readlink() and add support of symlinks, charcter and block devices to stat().
2005-11-05 22:54:43 +00:00
flatcap 83b9eddfc9 provide some meaningful function descriptions 2005-11-02 17:34:08 +00:00
flatcap 121d05deb6 add/update function comment blocks
(ok, they need words, but it's a start)
2005-10-30 16:12:22 +00:00
uvman 5b949d07fa Fix comment formats. 2005-10-28 12:55:41 +00:00
flatcap 8892ba7ac6 remove some colour hacks
remove a few #ifdef DEBUGs and RM_WRITEs
throw in lots of extra traces
2005-10-28 04:32:21 +00:00
szaka 746dff1a24 NTFS_INDEX_ prefix $I30, $SII, $SDH, $O and $Q indexes 2005-10-23 18:35:58 +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
flatcap 2a8d602d9f ntfsrm has been split up and merged into libntfs.
currently it's #ifdef'd out.
tree.c - code for handling directory trees
rich.c - a few helpers without a home (this file will go away soon)
Note: ntfsrm isn't in the build any more (you need to ./configure --enable-rich; make extras).  When rm is less intrusive, again, I'll put it back in the build.
2005-10-16 23:33:03 +00:00
flatcap 8fa46025d5 trailing whitespace 2005-10-16 19:21:47 +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
cha0smaster 3629d931c6 Fix resident attribute adding: Add @val to ntfs_attr_add and @val and @size to ntfs_resident_attr_record_add.
Still need to fix attribute lis entry adding. :-(
2005-09-16 14:28:18 +00:00
cha0smaster 9028a53dfc Sorry it's very large commit (46K of diffs between my local tree and CVS HEAD
before commit), file and directory creation/deletion recursively requested many
changes. See ChangeLog for description of all changes.
2005-08-14 15:44:46 +00:00
antona 6124aafffb Move timeconv to ntfstime, update changelog, and news for new release. 2005-08-04 09:59:39 +00:00
szaka d292ae2d27 Fix random errno returned by ntfs_inode_open() if the MFT record wasn't in use 2005-07-30 16:36:24 +00:00
cha0smaster b39a2a401f - Move ntfs2utc and utc2ntfs from utils.[ch] to timeconv.h.
- Add [acm]time fields to struct ntfs_inode and set them during ntfs_inode_open.  Update ntfsmount to use them.
- Bump version, update autoscripts.
2005-07-20 19:06:28 +00:00
flatcap 7a142ef54c got bored. don't read the diffs. 2005-07-06 22:47:01 +00:00
cha0smaster 9deb743974 Optimize a bit previous ntfs_inode_close fix. 2005-07-02 17:48:59 +00:00
cha0smaster b8e1188102 Fix memory managament error in ntfs_inode_close. ntfs_extent_inode_open
allocates buffer for up to 4 extent inodes, to prevent many reallocates.
But ntfs_inode_close always reallocate buffer to store exactly @nr_extents
inodes. Bug will arise in following scenario:
1) ntfs_extent_inode_open (1 extent, allocate buffer for 4)
2) ntfs_extent_inode_open (2 extents, use already allocated buffer)
3) ntfs_inode_close(extent_ni) (1 extent, reallocate buffer for 1 extent)
4) ntfs_extent_inode_open (2 extents, don't reallocate buffer because it should be for 4 elements, but really it's for 1, write to unitialized space, segfault)
2005-07-02 13:58:02 +00:00
szaka 70530ad551 ntfs_inode_close(): ElectricFence is unhappy with realloc(x,0) as free(x)
thus we distinguish these two cases
2005-06-27 20:30:09 +00:00
szaka d8dd64d425 Correct ntfs_inode_sync_file_name comment typos 2005-06-25 13:15:12 +00:00
antona ca873f0474 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.
2005-06-20 14:31:30 +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 373e47acb5 Fix coding style. 2005-06-08 18:02:29 +00:00
cha0smaster 4b000b3d13 - Implement FILE_NAME attributes update in index during inode sync and enable code that set/clean sparse bit. Also add new inode state bit FileNameDirty to indicate that FILE_NAME attributes need update. At least after attribute resize we leave absolutely consist volume.
- Bugfixes to collate.c and index.c.
- Minor formating fixed to ntfscp and ntfsinfo.
2005-06-05 14:55:08 +00:00
void!yura 98ac77e115 ntfs_inode_attach_all_extents: don't try to attach base inode to itself and optimize algorithm a bit.
(Logical change 1.669)
2005-01-27 18:31:08 +00:00
void!yura e89f48810a Fix stupid bug trying to sync standard information for not base inode.
(Logical change 1.667)
2005-01-26 23:37:25 +00:00
void!yura 3dd3b08b07 fix compiler warning about ntfs_inode_sync_standard_information
(Logical change 1.659)
2005-01-17 11:50:36 +00:00