From 8b1263c21710225883228ddc5c631d3a39171451 Mon Sep 17 00:00:00 2001 From: szaka Date: Thu, 27 Oct 2005 18:45:45 +0000 Subject: [PATCH] Working with regular files needs no longer --force, except for mkntfs --- ChangeLog | 2 ++ ntfsprogs/utils.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c6fbd0b2..8c1f2974 100644 --- a/ChangeLog +++ b/ChangeLog @@ -43,6 +43,8 @@ xx/xx/2005 - 1.12.2-WIP - Add some debugging to ntfsdecrypt.c to allow printing of the private key after it is decrypted (this is ifdeffed out by default). (Anton) - fflush() ntfs_log_ streams. (Christophe) + - Working with regular files needs no longer the --force option, + except for mkntfs. (Szaka) 10/10/2005 - 1.12.1 - Minor fix to location of mount.ntfs-fuse and mkfs.ntfs. diff --git a/ntfsprogs/utils.c b/ntfsprogs/utils.c index 82c64665..088e364c 100644 --- a/ntfsprogs/utils.c +++ b/ntfsprogs/utils.c @@ -133,10 +133,12 @@ int utils_valid_device(const char *name, int force) return 0; } - if (!S_ISBLK(st.st_mode)) { - ntfs_log_warning("%s is not a block device.\n", name); + if (!S_ISBLK(st.st_mode) && !S_ISREG(st.st_mode)) { + ntfs_log_warning("%s is not a block device, " + "nor regular file.\n", name); if (!force) { - ntfs_log_error("Use the force option to work with files.\n"); + ntfs_log_error("Use the force option to work with other" + " file types, for your own risk!\n"); return 0; } ntfs_log_warning("Forced to continue.\n");