Commit Graph

136 Commits (ba3cb2c88b8f77ee82a4d66d1384f3d4d181a895)

Author SHA1 Message Date
Jean-Pierre André ba3cb2c88b Fixed displaying progress percentage for metadata images
When building (options -ms) or restoring a metadata image, the progress
percentages were wrong (evaluated against a wrong base)
2012-08-20 13:44:33 +02:00
Jean-Pierre André 54f96e4af1 Implemented an option to set a new serial number in ntfsclone
Defined new options --new-serial and --new-half-serial to set a new
random serial number when cloning or restoring a file system.
Useful for mounting the original and the cloned file system at the
same time.
2012-01-23 18:19:17 +01:00
Jean-Pierre André e7bfd31de4 Fixed clearing user data when creating metadata images
Clearing of user data was wrong when extracting the metadata into a
special format image. In this situation the clearing has to be done
without mounting the file system.
2012-01-23 18:13:59 +01:00
Jean-Pierre André 4a0892eb26 Implemented a new option -q to avoid updating the progress information (Matthew Boyle)
The progress bars complexify the integration of ntfsclone into other
tools, the option -q (or --quiet) gets rid of them.
2012-01-23 18:10:26 +01:00
Jean-Pierre André 5593ee2711 fixed clearing the end of extents when extracting metadata
When extracting the metadata, unused data at the end of MFT records is
supposed to be cleared. This was done for the base record of each file,
but not for the extent records.
2012-01-23 17:11:46 +01:00
Jean-Pierre André 42597c830d Developped creating a metadata image in ntfsclone
With this patch a metadata image can be created without creating
an intermediate file. Use both option -m and -s.
2011-10-07 11:42:08 +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é 1673ce9c91 Accepted the backup bootsector not be to accounted for when cloning 2011-07-05 12:17:29 +02:00
Jean-Pierre André 259b8ab308 Fixed compilation on OpenIndiana (Apostolos Syropoulos) 2011-07-05 12:17:11 +02:00
Jean-Pierre André b4d1c6165b Used a stream to produce aligned writes in image creation
When creating a partition image, ntfsclone write an extra byte to
describe each cluster, this causes two unneeded ntfs-3g calls per cluster,
and inefficiency when imaging to ntfs.
2011-03-23 09:35:24 +01:00
Jean-Pierre André c6da530efc Synced the created image before remounting in ntfsclone
Better sync before remounting, but probably not an error
2011-03-23 08:59:49 +01:00
Jean-Pierre André e20c1df1e5 Fixed copying the backup boot sector on a partial cluster
A recent patch added copying the backup boot sector when cloning,
saving or restoring a partition, but when the total number of sectors is
not a multiple of the number of sectors per cluster, the last cluster
containing the backup boot sector is shorter than usual.
When this happens, the present patch avoids overflowing from partition
when accessing the last cluster.
2011-02-17 16:11:26 +01:00
Jean-Pierre André f68259e0c2 Copied the alternate boot sector when cloning 2011-02-16 12:18:56 +01:00
Jean-Pierre André 70490ce10e Silenced warnings for no return 2010-12-21 15:51:08 +01:00
Jean-Pierre André 3a6ea1f2c9 Avoided writing beyond allocated variable 2010-12-21 15:51:07 +01:00
Jean-Pierre André f21110f9a3 Closed volume and cleaned up when exiting from ntfsclone 2010-12-21 15:51:07 +01:00
Jean-Pierre André 31ce5db142 Added option for not clearing the timestamps in ntfsclone 2010-12-21 15:51:07 +01:00
Jean-Pierre André f3e6a1af01 Fixed reading old big-endian ntfsclone images 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 c5ecb91ffe Merge remote branch 'linux-ntfs/libntfs-3g_port-edge' into ntfsprogs_merge.edge
Conflicts:
	ChangeLog
	libntfs/libntfs.8.in
2010-12-19 15:20:24 +01:00
Erik Larsson ef0190cbd7 Merge branch 'master' into libntfs-3g_port-edge
Conflicts:
	configure.ac
	libntfs/bootsect.c
	libntfs/logging.c
	ntfsprogs/ntfsmount.c
2010-12-19 09:06:45 +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 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 058e47afbd Updated references to members of INDEX_HEADER and INDEX_ENTRY that have been renamed in libntfs-3g.
INDEX_HEADER: flags -> ih_flags
INDEX_ENTRY: flags -> ie_flags
2010-12-02 16:10:18 +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
Olaf Rempel 48f652e0e1 ntfsclone: fix restore from stdin
When doing a ntfclone-restore from stdin and stdin is then closed,
ntfsclone will loop forever:
$ cat corrupt_image.gz | gzip -d | ntfsclone -r -O somedisk -

With this patch the io_all() loop will return an error when the
input-stream is closed.
2009-03-28 00:25:58 +02:00
Anton Altaparmakov fb4a13008e ntfsclone: Allow metadata cloning to block devices when --force option
is supplied. (Anton)
2007-10-26 11:28:51 +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 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 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
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
szaka 3cd5cb9c8a Don't check free space if output file is FIFO (Andree Leidenfrost) 2006-12-03 18:26:58 +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 15eb2c38a6 constify string argument. 2006-10-28 23:41:41 +00:00
uvman ff55ecb513 Whitespace cleanup 2006-10-27 12:24:29 +00:00
uvman acb04c0435 Remove unneeded padding. The compiler will pad if it wan't to. 2006-10-18 14:41:41 +00:00
aia21 2afc70711a Forgot to not apply endianness swapping for old style images when restoring... 2006-08-23 13:21:04 +00:00
aia21 35dcfaac9e Fix endianness problems in both image restore and image create (and in metadata
cloning as well).  (Anton)
2006-08-23 11:58:55 +00:00
aia21 cb35fe2fea Make ntfsclone image format extensible. (Anton) 2006-08-23 11:22:07 +00:00