From nobody Mon Feb 9 05:20:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529930732056166.62862103432292; Mon, 25 Jun 2018 05:45:32 -0700 (PDT) Received: from localhost ([::1]:46607 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXQrz-0002Io-UF for importer@patchew.org; Mon, 25 Jun 2018 08:45:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXQpo-0000rJ-EG for qemu-devel@nongnu.org; Mon, 25 Jun 2018 08:43:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXQpn-0007QW-N9 for qemu-devel@nongnu.org; Mon, 25 Jun 2018 08:43:08 -0400 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:43531) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXQpn-0007QR-JI; Mon, 25 Jun 2018 08:43:07 -0400 Received: by mail-qt0-x241.google.com with SMTP id y89-v6so11726247qtd.10; Mon, 25 Jun 2018 05:43:07 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id m15-v6sm12549562qtm.84.2018.06.25.05.43.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 05:43:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/uhxOdbA+vgV5vCA97X72xVbXYK5Fo2EDSVbEPo8dWg=; b=RwklFawJiyk5buTMG40SZs9/tgIgRa2E+1e9W8ULAiAG66nM32WcP1gc+7Di5Yp92G R1bwWRoQHjuqx0Cvh97PE7watYEBJBsM3BgBnp0sO/NS/wcY0NP9JmTzKIr5gyLZiCQY AOADc15a44YFZytlDFTXnrJVCHLPo3a0RBRDY+cjheCXHr56OtY4IIY27F/ZvvCyWxGG QzB0fU4PgTZFQnWLhHBqOgUDPeGL/PyTL82bdd4oc4kNcdzlateNFSPZPRa6gfuaVDxi uW9JyLDYFhdC08a/Tbe5spVFZirWHg9UhSJMOx7LrFqlyn6weGt+p+7H638Akdb+wh++ OEOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/uhxOdbA+vgV5vCA97X72xVbXYK5Fo2EDSVbEPo8dWg=; b=o78gBuiZYK8REoyRB7BzLDeN7KgXwmAS+1A4JSbGIFtND4tgXoGWo4hmXPWIhjkgQz 4nKWx4WJ4KMIU9nKBcAIeGvZ05M/F7Ht+8WIJUX/Rh69JS0ecwBzxmPrO+w9pgM3HGvJ liJpRTgjyyX4sSitDi484BzcYU6RM9AiT+MBt5ECxZW0OtUKJ4kocABXrtC4Dr/1gIyA wL3iQV5JszkdWDHoKdIkPxzm84R8TK0ruIipGtKvptxV2gTAYZNhl7FHE6FKbz+HSaqH rTDOSAb/A9gifC7fzCMr500Hk6CDj76X5hfTExYxcptEeJOEVoD/h49YGx8ulfBbA3GE +9Tg== X-Gm-Message-State: APt69E0Ij6ADUE1jXcNv0Ofaa1qViuyz/zAq3/M93SFpW+r9d2prnCu+ mquK3/pHBietj66LhqHU2IY= X-Google-Smtp-Source: AAOMgpf2LggXBLrLvXgDgAf4kJKdlu/ak7i+GVK0YBzZPasIoxNof7sqSidljSA4AD0hLKnA32HcSw== X-Received: by 2002:a0c:b311:: with SMTP id s17-v6mr3902475qve.243.1529930587025; Mon, 25 Jun 2018 05:43:07 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Thomas Huth , Stefan Weil Date: Mon, 25 Jun 2018 09:41:54 -0300 Message-Id: <20180625124238.25339-3-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180625124238.25339-1-f4bug@amsat.org> References: <20180625124238.25339-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::241 Subject: [Qemu-devel] [PATCH v5 02/46] vdi: Use definitions from "qemu/units.h" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, "open list:VDI" , qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Weil Reviewed-by: Richard Henderson --- block/vdi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/block/vdi.c b/block/vdi.c index 1d8ed67dbf..6555cffb88 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -50,6 +50,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/units.h" #include "qapi/error.h" #include "qapi/qobject-input-visitor.h" #include "qapi/qapi-visit-block-core.h" @@ -83,9 +84,6 @@ /* Command line option for static images. */ #define BLOCK_OPT_STATIC "static" =20 -#define KiB 1024 -#define MiB (KiB * KiB) - #define SECTOR_SIZE 512 #define DEFAULT_CLUSTER_SIZE (1 * MiB) =20 @@ -434,7 +432,8 @@ static int vdi_open(BlockDriverState *bs, QDict *option= s, int flags, goto fail; } else if (header.block_size !=3D DEFAULT_CLUSTER_SIZE) { error_setg(errp, "unsupported VDI image (block size %" PRIu32 - " is not %u)", header.block_size, DEFAULT_CLUSTER_SIZE); + " is not %" PRIu64 ")", + header.block_size, DEFAULT_CLUSTER_SIZE); ret =3D -ENOTSUP; goto fail; } else if (header.disk_size > --=20 2.18.0