mirror of
https://github.com/adulau/dcfldd.git
synced 2024-12-22 16:56:03 +00:00
Debian patches added
This commit is contained in:
parent
0ffc12ec0f
commit
2cb7b7012c
2 changed files with 40 additions and 0 deletions
24
debian/patches/fix-probing-of-large-block-devices.patch
vendored
Normal file
24
debian/patches/fix-probing-of-large-block-devices.patch
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
Description: fix size probing of large block devices.
|
||||
Author: Vangelis Koukis <vkoukis@gmail.com>
|
||||
Last-Update: 2014-08-03
|
||||
Index: dcfldd-1.3.4.1/sizeprobe.c
|
||||
===================================================================
|
||||
--- dcfldd-1.3.4.1.orig/sizeprobe.c
|
||||
+++ dcfldd-1.3.4.1/sizeprobe.c
|
||||
@@ -63,9 +63,13 @@ static off_t midpoint(off_t a, off_t b,
|
||||
static off_t get_dev_size(int fd, long blksize)
|
||||
{
|
||||
off_t num_sectors = 0;
|
||||
-
|
||||
- if (ioctl(fd, BLKGETSIZE, &num_sectors))
|
||||
- log_info("%s: ioctl call to BLKGETSIZE failed.\n", program_name);
|
||||
+
|
||||
+ /*
|
||||
+ * Use BLKGETSIZE64 unconditionally, since dcfldd.h #defines _FILE_OFFSET_BITS 64
|
||||
+ * and off_t is guaranteed to be large enough to hold the result.
|
||||
+ */
|
||||
+ if (ioctl(fd, BLKGETSIZE64, &num_sectors))
|
||||
+ log_info("%s: ioctl call to BLKGETSIZE64 failed.\n", program_name);
|
||||
else
|
||||
return (num_sectors * 512);
|
||||
}
|
16
debian/patches/fix-sizeprobe-option.patch
vendored
Normal file
16
debian/patches/fix-sizeprobe-option.patch
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
Description: fix the sizeprobe=of option.
|
||||
Author: Vangelis Koukis <vkoukis@gmail.com>
|
||||
Last-Update: 2014-08-03
|
||||
Index: dcfldd-1.3.4.1/dcfldd.c
|
||||
===================================================================
|
||||
--- dcfldd-1.3.4.1.orig/dcfldd.c
|
||||
+++ dcfldd-1.3.4.1/dcfldd.c
|
||||
@@ -759,7 +759,7 @@ int main(int argc, char **argv)
|
||||
else
|
||||
sizeprobe(STDIN_FILENO);
|
||||
else if (probe == PROBE_OUTPUT)
|
||||
- sizeprobe(STDOUT_FILENO);
|
||||
+ sizeprobe(outputlist->data.fd);
|
||||
start_time = time(NULL);
|
||||
|
||||
if (do_verify)
|
Loading…
Reference in a new issue