From fb4a13008e3a785aed7e25db82c33697746fee9d Mon Sep 17 00:00:00 2001 From: Anton Altaparmakov Date: Fri, 26 Oct 2007 11:28:51 +0100 Subject: [PATCH] ntfsclone: Allow metadata cloning to block devices when --force option is supplied. (Anton) --- ChangeLog | 2 ++ ntfsprogs/ntfsclone.c | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4929bf7f..cef77529 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ xx/xx/2007 - 2.0.1 ntfsmount. (Yura, reported by Andrey Rahmatullin) - ntfsck: Use ntfs_pread instead ops->pread. (Yura, reported by Christophe GRENIER) + - ntfsclone: Allow metadata cloning to block devices when --force + option is supplied. (Anton) 28/09/2007 - 2.0.0 - ntfsmount sports full read/write, libntfs can read encrypted files and ntfsresize supports Vista. diff --git a/ntfsprogs/ntfsclone.c b/ntfsprogs/ntfsclone.c index dfcb58d9..58b93c58 100644 --- a/ntfsprogs/ntfsclone.c +++ b/ntfsprogs/ntfsclone.c @@ -420,9 +420,17 @@ static void parse_options(int argc, char **argv) if (S_ISBLK(st.st_mode)) { opt.blkdev_out = 1; - if (opt.metadata) + if (opt.metadata && !opt.force) err_exit("Cloning only metadata to a " - "block device isn't supported!\n"); + "block device does not usually " + "make sense, aborting...\n" + "If you were instructed to do " + "this by a developer and/or are " + "sure that this is what you want " + "to do, run this utility again " + "but this time add the force " + "option, i.e. add '--force' to " + "the command line arguments."); } } }