From f3c4c6c6046c6eeb38779858ba5299f0f388c300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Sat, 12 Apr 2014 09:14:08 +0200 Subject: [PATCH] Fixed ioctl() error return for ntfsclone on Windows The ioctl() function is not implemented in the Windows variant. By forcing a negative apparent return, an alternative is triggered to get the partition size which is normally obtained from an ioctl(). --- ntfsprogs/ntfsclone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntfsprogs/ntfsclone.c b/ntfsprogs/ntfsclone.c index 33d76d8a..cc047f52 100644 --- a/ntfsprogs/ntfsclone.c +++ b/ntfsprogs/ntfsclone.c @@ -115,7 +115,7 @@ int setmode(int, int); /* from msvcrt.dll */ #define srandom(seed) srand(seed) #define random() rand() #define fsync(fd) (0) -#define ioctl(fd,code,buf) (0) +#define ioctl(fd,code,buf) (-1) #define ftruncate(fd, size) ntfs_device_win32_ftruncate(dev_out, size) #define BINWMODE "wb" #else