From 0aa1ce1056b5904fe5ce8fab1fcd9a03c9cfeda5 Mon Sep 17 00:00:00 2001 From: Thorsten Engel Date: Tue, 12 Jul 2005 15:55:42 +0000 Subject: [PATCH] small change to work with correct buffer size on raw partitions when on win32. I assume the BSD code part (line 424) is faulty as it only is activated when SPARSE is on. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2191 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/filed/backup.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c index fe1b14348b..f030b007e5 100644 --- a/bacula/src/filed/backup.c +++ b/bacula/src/filed/backup.c @@ -425,6 +425,12 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, struct CHKSUM *chksum) #endif } + /* a RAW device read on win32 only works if the buffer is a multiple of 512 */ +#ifdef HAVE_WIN32 + if (S_ISBLK(ff_pkt->statp.st_mode)) + rsize = (rsize/512) * 512; +#endif + /* * Read the file data */ -- 2.39.5