Don't check free space if output file is FIFO (Andree Leidenfrost)

edge.strict_endians
szaka 2006-12-03 18:26:58 +00:00
parent 33ffbb2af7
commit 3cd5cb9c8a
2 changed files with 10 additions and 0 deletions

View File

@ -93,6 +93,8 @@ xx/xx/2006 - x.xx.x - .
- Raise FUSE dependence to 2.6.1 (the most stable and featured ATM),
rename --enable-fuse-module to more clear --enable-ntfsmount and
cleanup autotools scripts a bit.
- ntfsclone: don't check free space if output file is FIFO (Andree
Leidenfrost)
21/06/2006 - 1.13.1 - Various fixes.

View File

@ -1717,6 +1717,7 @@ static void check_dest_free_space(u64 src_bytes)
{
u64 dest_bytes;
struct statvfs stvfs;
struct stat stat;
if (opt.metadata || opt.blkdev_out || opt.std_out)
return;
@ -1729,6 +1730,13 @@ static void check_dest_free_space(u64 src_bytes)
strerror(errno));
return;
}
/* If file is a FIFO then there is no point in checking the size. */
if (!fstat(fd_out, &stat)) {
if (S_ISFIFO(stat.st_mode))
return;
} else
Printf("WARNING: fstat failed: %s\n", strerror(errno));
dest_bytes = (u64)stvfs.f_frsize * stvfs.f_bfree;
if (!dest_bytes)