2 files changed, 122 insertions(+), 74 deletions(-)
diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx
-index 4b47f7495d..db1df8f60b 100644
+index 1c93e6d185..8094abb3ee 100644
--- a/qemu-img-cmds.hx
+++ b/qemu-img-cmds.hx
@@ -56,9 +56,9 @@ STEXI
DEF("info", img_info,
diff --git a/qemu-img.c b/qemu-img.c
-index 4546198471..6e1a3b8933 100644
+index c64f260876..8129677d7a 100644
--- a/qemu-img.c
+++ b/qemu-img.c
-@@ -4313,10 +4313,12 @@ out:
+@@ -4413,10 +4413,12 @@ out:
#define C_IF 04
#define C_OF 010
#define C_SKIP 020
};
struct DdIo {
-@@ -4395,6 +4397,20 @@ static int img_dd_skip(const char *arg,
+@@ -4495,6 +4497,20 @@ static int img_dd_skip(const char *arg,
return 0;
}
static int img_dd(int argc, char **argv)
{
int ret = 0;
-@@ -4435,6 +4451,7 @@ static int img_dd(int argc, char **argv)
+@@ -4535,6 +4551,7 @@ static int img_dd(int argc, char **argv)
{ "if", img_dd_if, C_IF },
{ "of", img_dd_of, C_OF },
{ "skip", img_dd_skip, C_SKIP },
{ NULL, NULL, 0 }
};
const struct option long_options[] = {
-@@ -4513,8 +4530,13 @@ static int img_dd(int argc, char **argv)
+@@ -4613,8 +4630,13 @@ static int img_dd(int argc, char **argv)
arg = NULL;
}
ret = -1;
goto out;
}
-@@ -4526,85 +4548,101 @@ static int img_dd(int argc, char **argv)
+@@ -4626,85 +4648,101 @@ static int img_dd(int argc, char **argv)
goto out;
}
}
if (dd.flags & C_SKIP && (in.offset > INT64_MAX / in.bsz ||
-@@ -4622,11 +4660,17 @@ static int img_dd(int argc, char **argv)
+@@ -4722,11 +4760,17 @@ static int img_dd(int argc, char **argv)
for (out_pos = 0; in_pos < size; block_count++) {
int in_ret, out_ret;
}
if (in_ret < 0) {
error_report("error while reading from input image file: %s",
-@@ -4636,9 +4680,13 @@ static int img_dd(int argc, char **argv)
+@@ -4736,9 +4780,13 @@ static int img_dd(int argc, char **argv)
}
in_pos += in_ret;