Changes by: szaka
Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs
In directory delta357:/tmp/cvs-serv8432/ntfsprogs
Modified Files:
ntfsclone.c
Log Message:
Don't check free space if output file is FIFO (Andree Leidenfrost)
Index: ntfsclone.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsclone.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -p -r1.95 -r1.96
--- ntfsclone.c 28 Nov 2006 10:09:57 -0000 1.95
+++ ntfsclone.c 3 Dec 2006 18:26:58 -0000 1.96
@@ -1717,6 +1717,7 @@ static void check_dest_free_space(u64 sr
{
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 sr
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)
|