qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2] qemu-img: add conv=notrunc option to dd


From: Stefan Hajnoczi
Subject: Re: [Qemu-block] [PATCH v2] qemu-img: add conv=notrunc option to dd
Date: Thu, 11 Aug 2016 09:57:25 +0100
User-agent: Mutt/1.6.2 (2016-07-01)

On Thu, Aug 11, 2016 at 05:51:43AM +0200, Reda Sallahi wrote:
> @@ -3997,6 +4017,14 @@ static int img_dd(int argc, char **argv)
>          g_free(arg);
>          arg = NULL;
>      }
> +    if (!(dd.conv & C_NOTRUNC)) {
> +        /* We make conv=notrunc mandatory for the moment to avoid accidental
> +           destruction of the output image. Needs to be changed when a better
> +           solution is found */
> +        error_report("conv=notrunc not specified");
> +        ret = -1;
> +        goto out;
> +    }

Maybe I'm missing context in this patch but conv=notrunc is only needed
if the output file already exists.  The user shouldn't have to specify
it if the output file does not exist yet - that would be an annoying
user interface quirk.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]