Commit Graph

157 Commits (c0955e5d74f8f856116b9c87a2b6746b9d44d2bd)

Author SHA1 Message Date
Jean-Pierre André c0955e5d74 cosmetic : fixed improper wordings (hggdh2) 2011-09-28 16:41:12 +02:00
Jean-Pierre André 08bf2b5bcb Avoided logging meaningless fixup errors in ntfsclone and ntfsresize
Logging of fixup errors for uninitialized inodes cause unnecessary
worries and suspicion of malfunctions in ntfs-3g. This patch silences
these loggings in ntfsclone and ntfsresize which have to analyze all
inodes, including the uninitialized ones.
2011-09-23 11:28:42 +02:00
Jean-Pierre André f10f067c7b revert : Reverted to old behavior for errored reply in ntfsresize 2011-08-04 15:49:35 +02:00
Jean-Pierre André 17caba34db Implemented expanding runlists in ntfsresize (Fedora 689275) 2011-07-05 12:17:30 +02:00
Jean-Pierre André bde75a7bce Optionally closed volume and cleaned memory when leaving ntfsresize (kept disabled) 2011-07-05 12:17:30 +02:00
Jean-Pierre André 5aa84db792 Silenced warning for ignoring the result of fgets in ntfsresize 2011-07-05 12:17:11 +02:00
Jean-Pierre André 259b8ab308 Fixed compilation on OpenIndiana (Apostolos Syropoulos) 2011-07-05 12:17:11 +02:00
Jean-Pierre André 67f07ac3ad Added option --check to ntfsresize (from fedora) 2011-03-23 09:50:12 +01:00
Jean-Pierre André 71488598d7 Added option --info-mb-only to ntfsresize (from fedora) 2011-03-23 09:48:40 +01:00
Jean-Pierre André 2a2d94897c Silenced warnings for no-return functions in ntfsresize 2011-03-23 09:29:27 +01:00
Jean-Pierre André d4e2a501a5 Enabled forensic mounting 2010-12-21 15:51:07 +01:00
Jean-Pierre André 8f4aa0883b Strengthened variable types 2010-12-21 15:51:07 +01:00
Jean-Pierre André 1ca4a556b2 Silenced warnings for unmatching printf-type formats 2010-12-21 15:51:07 +01: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 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 6b513b1c55 Replaced references to NVolSetWasDirty with appropriate substitutions.
libntfs (unlike libntfs-3g) sets the volume dirty bit automatically on ntfs_mount (if not already set) and also automatically clears the volume dirty bit on ntfs_umount (if it was not already set before mount). The 'WasDirty' flag is set to indicate that the volume was already dirty when it was mounted, so setting it means bypassing the 'clear dirty flag' behaviour on unmount (it does not mean 'set dirty flag on unmount').

NVolSetWasDirty is accordingly replaced with the actions that were intended:
- If the intention was to leave the dirty bit set on unmount, we explicitly set the bit if it is not already set.
- If the intention was to simply update the 'WasDirty' bit to be consistent with earlier changes, we just comment out the statement.
2010-12-02 22:34:45 +01:00
Erik Larsson f5f3878a8e Replaced all occurrences of the libntfs-specific NVolWasDirty macro with a test for the VOLUME_IS_DIRTY flag in vol->flags.
This is not a perfect conversion. The VOLUME_IS_DIRTY flag reflects the _current_ state of the volume dirty bit and not the mount-time state.
However, since libntfs-3g (as opposed to libntfs) does not automatically change the dirty bit on mount and unmount (only when ntfs_volume_write_flags is called explicitly), and these tests are done directly after a mount (ntfsclone.c, ntfscp.c, ntfsresize.c, ntfswipe.c, utils.c) or when the volume is in an appropriate state (ntfsfix.c), the result will be the same.
2010-12-02 22:34:35 +01:00
Erik Larsson 41e27e116a Added 'misc.h' as an include to some source files because of missing ntfs_malloc / ntfs_calloc signatures. 2010-12-02 22:31:56 +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 4a641c85e0 Adapted code to latest libntfs-3g, based on PERMISSION_HANDLING_BRANCH. Now requires libntfs-3g version 2010.5.22 minimum. 2010-12-02 16:35:27 +01:00
Erik Larsson 36b876375e Commented out all instances of MS_NOATIME being passed to ntfs_mount, as libntfs-3g does not support that flag.
In fact, this is how libntfs-3g operates normally, so the MS_NOATIME flag is not needed. However, other utilities might incorrectly assume that the library updates access times for them.
Investigating whether access time needs to be manually updated in other utilities is TODO.
2010-12-02 16:31:43 +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 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