Working with regular files needs no longer --force, except for mkntfs

This commit is contained in:
szaka 2005-10-27 18:45:45 +00:00
parent 01585fd7cd
commit 8b1263c217
2 changed files with 7 additions and 3 deletions

View File

@ -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.

View File

@ -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");