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
ea4d352f7e
Fix sparse warnings from git HEAD version
2007-07-21 22:01:57 +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
10b22550cd
more sparse fixes
...
left only endianness and this stupid problems with s64
2006-12-12 19:00:00 +00:00
aia21
a38ead2f20
Szaka prefers to have the lofgile reset and dirty bit setting done even if they
...
are already done so remove the conditionals I added.
2006-12-11 10:41:34 +00:00
aia21
0089670e1c
Use NTFS_MNT_FORENSIC with ntfsresize to restore old behaviour as it is
...
documented, i.e. that ntfsresize does not do any modifciations until you say
so. Also reinstate code to do the journal emptying and setting of dirty flag
on the volume because of it. However update the code so that those things are
only done if they were not already the case.
2006-12-03 08:59:57 +00:00
aia21
f40bef7246
Disable unmounting at the point of no return when we start doing serious
...
modifications to the volume. Hopefully Szaka will be happy now. (-:
2006-11-28 13:45:42 +00:00
aia21
a32aa26d0b
- Fix ntfsresize to unmount the volume when finished/exiting so it does
...
not leave the volume in an inconsistent state. Somewhat crude
solution using atexit() but it works... (Anton)
2006-11-28 11:00:52 +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
cb27c9f616
* Rename MS_{RDONLY,NOATIME} to NTFS_MNT_{RDONLY,NOATIME}.
...
2006-11-12 22:46:50 +00:00
uvman
ff55ecb513
Whitespace cleanup
2006-10-27 12:24:29 +00:00
uvman
6efbbabba6
Spelling fix.
2006-10-18 14:43:04 +00:00
uvman
acb04c0435
Remove unneeded padding. The compiler will pad if it wan't to.
2006-10-18 14:41:41 +00:00
szaka
c4a3f8b3e9
convert all malloc,calloc to ntfs_{malloc,calloc}
2006-08-13 16:06:57 +00:00
szaka
00348fc7f5
Warn about bad sectors if pure disk I/O fails with EIO. This is regularly
...
reported with faulty disks.
2006-04-18 22:03:09 +00:00
szaka
03946d896e
Print more info on relocations in verbose mode
2006-04-18 21:37:24 +00:00
szaka
c7a53338c0
Fix all incorrect getopt_long() return value usages.
2006-04-05 12:43:06 +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
be823c7a1e
libntfs: add ntfs_str2ucs and ntfs_freeucs function, and convert
...
copy-pastes to use them
2006-04-05 02:45:55 +00:00
szaka
ce894973ed
Cleanup has_bad_sectors() for code reuse; update copyrights
2006-03-30 00:15:32 +00:00
szaka
6b05529c37
Show all cluster accounting mismatches when --verbose used
2006-03-13 20:41:02 +00:00
szaka
e6a7600508
Restructure "Filesystem check failed!" message and have a more explanatory
...
one in the ERROR line because several front-ends show only this line, nothing
else, which greatly confused many users what's going on and what to do next.
2006-02-12 22:09:58 +00:00
szaka
c87059fa77
Fix $BadClust:$Bad AT_ATTRIBUTE_LIST detection which bug was introduced
...
recently only in the CVS version of ntfsresize; add also more info about
bad sectors.
2006-02-11 19:55:05 +00:00
szaka
fefc3e5195
ntfsresize, ntfsclone: always use MS_NOATIME
2006-02-05 16:39:35 +00:00
szaka
9d51139377
Fix typo
2006-02-04 13:39:19 +00:00
szaka
c47236819d
Explain EBUSY if volume opening failed
2006-02-04 13:34:37 +00:00
cha0smaster
eba747ac93
* Add NTFS_DEV_LIST define. Use it everywhere instead of linux-ntfs-dev@lists.sf.net.
...
* Replace all ntfs_log_trace where we ask to send mail to us with ntfs_log_error
2005-12-18 16:27:20 +00:00
szaka
f827828d5c
All errors go to stdout either directly or by redirection from stderr
2005-11-27 11:51:10 +00:00
szaka
93fabaf0c4
Removed usage of the old logging macros
2005-11-27 11:38:06 +00:00
flatcap
16dd9defa5
email typo
2005-10-28 04:31:45 +00:00
flatcap
8a584700c5
whitespace fixes - no code changes
2005-10-26 22:54:57 +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
szaka
27a9764d3a
Check and report bad sectors before cluster allocation check because
...
chkdsk doesn't always fix $Bitmap with bad sectors
2005-10-16 18:50:56 +00:00
szaka
48feb16fa9
Factor out cluster allocation check
2005-10-16 11:12:08 +00:00
antona
b9422552da
Fix compilation on OSX in ntfsresize.c where stderr = stdout is not
...
legal (but happens to work on Linux) to do proper low-level file
descriptor mangling which is portable. (Anton)
2005-10-15 21:26:16 +00:00
flatcap
42de4cf905
tidy up some __attribute__ usage
2005-10-12 11:52:40 +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
szaka
4f74c30984
Revert to the original output but by also fixing the "format string" warnings
2005-10-04 22:03:13 +00:00
uvman
62579b84d4
compiler warnings fixes.
2005-10-04 20:36:42 +00:00
szaka
54891f3112
Emphasize Windows needs to be rebooted twice after chkdsk /f
2005-09-30 20:29:58 +00:00
szaka
d07aab11f5
Update unclean_journal_msg
2005-09-30 19:46:45 +00:00
szaka
ab2ad80ae7
Accept incorrect $Bitmap size if it covers the entire volume
2005-09-29 23:30:15 +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
2a104d8eda
Megapatch!!! Check evecrything!!! I probably broke everything!!!
2005-09-24 22:54:55 +00:00
szaka
eb51c61ba4
Emphasize that disk partitioning must use sector as the unit instead of
...
cylinder to avoid shifting of the partition
2005-09-24 20:12:36 +00:00
szaka
4e8e7ae9fa
Fix for ntfs_rl_truncate() EIO: always set the correct size for $BadClus:$Bad,
...
even if Windows set it incorrectly
2005-08-03 22:40:29 +00:00
szaka
26bedb9462
rl_expand(): make it a bit more readable
2005-08-03 21:46:35 +00:00
szaka
22590fea7e
rl_expand(): check if new length isn't already more than requested
2005-08-03 21:35:22 +00:00
szaka
06052dafcf
Replaced all occurances of ENOTSUP to EOPNOTSUPP to be in better harmony
...
with the kernel driver
2005-08-01 22:10:38 +00:00
szaka
cebd8ec132
White space cleanup
2005-08-01 20:33:26 +00:00
szaka
78297900bd
Let the user know if the journal file couldn't be checked or was unlean
2005-08-01 20:22:24 +00:00
szaka
61ee94dfb2
Don't show detailed resizing related info by default since the only real
...
restriction to shrink to the smallest size possible is the relocation of
the first $MFT $DATA extent, usually around 3 GB.
2005-07-25 21:19:08 +00:00
szaka
7943e71620
Support resizing into the middle of a $MFT $DATA extent
2005-07-25 20:40:07 +00:00
szaka
34c676fad3
Support relocation of $MFT with $ATTRIBUTE_LIST
2005-07-24 22:34:36 +00:00
szaka
f6c4797379
Fix in relocate_attributes(): don't stop processing of MFT record attributes
...
at AT_DATA of $BadClus and $Bitmap. In practice, there aren't non-resident
attributes after them so this recent bug shouldn't have caused data loss.
2005-07-24 09:06:55 +00:00
szaka
d016f808d5
Fix read-only shrinkage failure if new size was too small by relocating and
...
writing $Bitmap:$DATA only once. This also improves performance.
2005-07-18 22:09:47 +00:00
szaka
a3ac693fca
Move the check for $Bitmap AT_ATTRIBUTE_LIST into resize constraints
2005-07-18 20:34:41 +00:00
szaka
2b2e127d26
Fix segfault during $Bitmap shrinkage introduced very recently by not
...
differentiating shrinkage and enlargement
2005-07-13 19:37:51 +00:00
szaka
436b290d03
Fix one-time memory leak in relocate_attributes()
2005-07-13 17:47:37 +00:00
szaka
8b148a061f
ntfsresize: give more hint if an $MFT run should be split. This will be the
...
next most common restriction when $MFT with ATTRIBUTE_LIST will be supported
2005-07-12 22:03:13 +00:00
szaka
8be0570dab
Prepare collect_resize_constraints() for $MFT with AT_ATTRIBUTE_LIST support
2005-07-12 21:46:40 +00:00
szaka
4c2cfb2583
Rephrase mentioning "dirty" volumes so people hopefully won't think that
...
Windows repairs what ntfsresize damaged. The real function of leaving
the volume dirty is to make Windows create the backup boot sector because
we can't know where the partitioner will exactly resizes (they optionally
round to some cylinder boundary, defined by ad hoc, arbitrariy rules).
2005-07-10 23:09:02 +00:00
flatcap
7a142ef54c
got bored. don't read the diffs.
2005-07-06 22:47:01 +00:00
szaka
2af728c6c4
ntfsresize: support bad clusters list ($BadClus:$Bad)
2005-07-03 23:21:01 +00:00
szaka
3f7c609ab2
truncate_bitmap_data_attr(): no need to distinguish shrinkage & enlargement
2005-06-30 21:13:34 +00:00
szaka
307c9b43e2
ntfsresize: show device name -- useful for bug reports
2005-06-27 21:18:40 +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
szaka
532e1b71cf
- fix bogus extra error message in ntfsresize
2005-06-12 13:44:34 +00:00
szaka
b4a712b9e1
- Use consistent option and parameter naming convention
2005-06-12 11:02:50 +00:00
szaka
4fcd676f63
- More explanatory error message about failing to open a volume
2005-06-12 10:15:21 +00:00
szaka
6aa5cc17fe
ntfsresize: fix segfault during fsck if $Bitmap was larger than expected
2005-05-24 21:13:51 +00:00
szaka
1cefeefd61
- hint to the user what to do if the partition is hibernated
2005-05-10 17:00:03 +00:00
cantab.net!aia21
12d49f4972
fix segfault during filesystem check if NTFS was corrupted
...
in a way that clusters were referenced outside of the volume. (Szaka)
(Logical change 1.697)
2005-04-19 12:01:38 +00:00
cantab.net!aia21
8b3c03e173
Rename scpu_to_le{16,32,64}() to cpu_to_sle{16,32,64}() to match the kernel.
...
(Logical change 1.586)
2004-09-30 15:00:31 +00:00
cantab.net!aia21
b82469ba50
Remove vol->nr_mft_records and update all users. (Anton)
...
(Logical change 1.549)
2004-09-13 10:28:54 +00:00
cantab.net!aia21
1159ab3656
Cleanup the ntfs_mapping_pairs_build enhancement.
...
(Logical change 1.548)
2004-09-13 09:31:42 +00:00
(none)!yura
27e0e7a0c7
Add @stopped_at parameter to ntfs_mapping_pairs_build and adapt all callers.
...
(Logical change 1.547)
2004-09-12 18:46:04 +00:00
cantab.net!aia21
06086ae5c7
Add start_vcn parameter to ntfs_get_size_for_mapping_pairs() and
...
ntfs_mapping_pairs_build() and adapt all callers.
(Logical change 1.533)
2004-09-06 09:27:16 +00:00
!uv
9747580a05
Warning fixes: printf complains, so add a cast.
...
(Logical change 1.508)
2004-08-20 12:30:34 +00:00
!uv
0106f54ff0
printf format fix.
...
(Logical change 1.507)
2004-08-20 12:18:22 +00:00
!uv
e7545d7e24
Reorder/pad struct members in order to align to 32 and 64 bit bounderies.
...
(Logical change 1.505)
2004-08-20 12:01:17 +00:00
!uv
27bf9c0ea0
Allow better compiler optimization/error checking.
...
(Logical change 1.504)
2004-08-20 11:58:24 +00:00
elisa-laajakaista.fi!szaka
be6c3651f6
make fsck related functions reusable: exit -> return conversations [ongoing]
...
(Logical change 1.437)
2004-06-23 14:18:45 +00:00
elisa-laajakaista.fi!szaka
75fe0ab100
Rename ntfs_fsck_t to ntfsck_t
...
(Logical change 1.399)
2004-05-26 04:20:29 +00:00
elisa-laajakaista.fi!szaka
0e3341d916
Eliminate the global opt.show_progress from progress_update() for code reuse
...
(Logical change 1.398)
2004-05-26 04:16:34 +00:00
cantab.net!aia21
3423a8a909
Rename uchar_t to ntfschar.
...
(Logical change 1.392)
2004-05-14 13:02:33 +00:00
elisa-laajakaista.fi!szaka
aadb68f43e
eliminated the global ntfs_volume variable
...
(Logical change 1.389)
2004-05-09 01:43:45 +00:00
elisa-laajakaista.fi!szaka
6e0b4d5d32
remove not-used-anymore last_unsafe member from ntfs_resize_t
...
(Logical change 1.388)
2004-05-08 23:29:54 +00:00
elisa-laajakaista.fi!szaka
0d541c6791
prepare truncate_badclust_file() for global variables elimination
...
(Logical change 1.387)
2004-05-08 23:25:46 +00:00
cantab.net!aia21
d990c89479
- Make endian safe. (Anton)
...
- Fix some compiler warnings. (Yuval)
(Logical change 1.379)
2004-04-23 10:12:49 +00:00
elisa-laajakaista.fi!szaka
fbd9efac4e
Auto merged
...
2004/04/17 04:01:46+03:00 elisa-laajakaista.fi!szaka
Detached ntfs_fsck_t from ntfs_resize_t and use it for check_allocation_bitmap() [in progress]
(Logical change 1.377)
2004-04-17 01:02:42 +00:00
cantab.net!aia21
71c1fe3af8
Update
...
(Logical change 1.374)
2004-04-16 20:54:34 +00:00
elisa-laajakaista.fi!szaka
49bc22ac54
split walk_inodes() into check_allocation_bitmap() and set_resize_constrains() [in progress]
...
(Logical change 1.372)
2004-04-16 19:25:24 +00:00
elisa-laajakaista.fi!szaka
cb7d91eb16
got rid of the global struct bitmap lcn_bitmap (some work towards code reuse)
...
(Logical change 1.364)
2004-04-14 01:23:36 +00:00
omakaista.fi!szaka
8f77300f3a
- recommend chkdsk /f if mapping pairs decoding fails with EIO (Kent B. Larsen)
...
- use corrupt_volume_msg in all relevant cases
- explain "bad sectors" a bit better
(Logical change 1.342)
2004-03-22 09:09:44 +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
c5847ae8cf
Fix two bugs, a->name_length is 8 bit not 16 bit...
...
(Logical change 1.313)
2004-03-10 09:36:44 +00:00
omakaista.fi!szaka
c90976e023
hand merged
...
2004/03/10 10:13:38+02:00 omakaista.fi!szaka
- Added warnings about not modifying text messages external tools use
- Options -i -s together aren't supported anymore, if needed use -n -v -s instead
- Usage() cleanup
- Some endianness fixes
- Suggest chkdsk /f if mount fails with EIO (Paul A. Steckler)
- Removed BETA and STABLE hints, now there is only one STABLE
- The --info option estimates the theoretically smallest shrunken size thus the message changed from "You ccould resize ..." to "You might resize ...".
(Logical change 1.312)
2004-03-10 09:28:44 +00:00
cantab.net!aia21
0acde67dde
A few missed.
...
(Logical change 1.308)
2004-03-09 16:00:13 +00:00
cantab.net!aia21
8b9213603f
Manual merge.
...
2004/03/09 14:38:50+00:00 cantab.net!aia21
Fix all occurences of printf with %ll length modifiers but 64 bit
arguments to typecast the arguments to (unsigned) long long to avoid
the warnings when compiling on 64 bit architectures.
(Logical change 1.306)
2004-03-09 14:47:34 +00:00