From nobody Fri Nov 14 00:46:06 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1583659637; cv=none; d=zohomail.com; s=zohoarc; b=liqqKq/AJmHcqElPAOulTxBq8N0+6yRNdpqBklnCEfxMWT8xY4UNt3DLAdT/ASmoKVY2uNTfuaN+gjC5+/04jwPjDCutZ5dzQpvocGCXPMVakkd8NG1RUY2RwiaA/uqkutVX6wNvmNSiaR0Yhq5yF6gnVCy4mYDt1iRvEcN+pEc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583659637; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=xRtG3JhmvyvgF+sHtipO5m+XE6oaJdutYEaSju2JbUk=; b=RKgA483D3N8oqdAZIi9+34rCJOitXEeFbs54ShTu3xkpO6OAniE4sLr7bwzqNpmhXKleo5uJWRGGhyAY8QvbbdZINQriXfQd2HB0DdNm2BPS9WtWHhn9CDPBGzFyacC1dRkOvfUa+TS0j7jSio2/eW5YC6WchGjFjUAQM/ZD3ME= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158365963736680.2433911474426; Sun, 8 Mar 2020 01:27:17 -0800 (PST) Received: from localhost ([::1]:56284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAsDM-0006iP-CT for importer@patchew.org; Sun, 08 Mar 2020 05:27:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55864) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAsB9-0002gr-Dr for qemu-devel@nongnu.org; Sun, 08 Mar 2020 05:25:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAsB8-0008RT-54 for qemu-devel@nongnu.org; Sun, 08 Mar 2020 05:24:59 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:32887 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jAsB8-0008RD-1x for qemu-devel@nongnu.org; Sun, 08 Mar 2020 05:24:58 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-271-Hg4-Qw0xPOq-e9AMt5Cs_Q-1; Sun, 08 Mar 2020 05:24:56 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E0C05107ACCA; Sun, 8 Mar 2020 09:24:54 +0000 (UTC) Received: from maximlenovopc.usersys.redhat.com (unknown [10.35.206.96]) by smtp.corp.redhat.com (Postfix) with ESMTP id B28C6100E805; Sun, 8 Mar 2020 09:24:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583659497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xRtG3JhmvyvgF+sHtipO5m+XE6oaJdutYEaSju2JbUk=; b=HnpOjKGUNbfy9OchrLQFAZSb3Ce6e8uBAxwcDEmYC97qF14mD/ChL1YV1ho3QoaI3gPpE7 vedx2E0aeXK+qzVlNXa+OvFPHgGN6+2KmAa8r5gNw2W0apjYw/nVwmp/DmhO3BhWixXjvl f40l55WTllBBi0FMF3neNpSZXJMFdxs= X-MC-Unique: Hg4-Qw0xPOq-e9AMt5Cs_Q-1 From: Maxim Levitsky To: qemu-devel@nongnu.org Subject: [PATCH v5 03/11] monitor/hmp: rename device-hotplug.c to block/monitor/block-hmp-cmds.c Date: Sun, 8 Mar 2020 11:24:32 +0200 Message-Id: <20200308092440.23564-4-mlevitsk@redhat.com> In-Reply-To: <20200308092440.23564-1-mlevitsk@redhat.com> References: <20200308092440.23564-1-mlevitsk@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Maxim Levitsky , qemu-block@nongnu.org, Markus Armbruster , "Dr. David Alan Gilbert" , Gerd Hoffmann , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" These days device-hotplug.c only contains the hmp_drive_add In the next patch, rest of hmp_drive* functions will be moved there. Also add block-hmp-cmds.h to contain prototypes of these functions License for block-hmp-cmds.h since it contains the code moved from sysemu.h which lacks license and thus according to LICENSE is under GPLv2+ Signed-off-by: Maxim Levitsky Reviewed-by: Markus Armbruster --- MAINTAINERS | 1 + Makefile.objs | 2 +- block/Makefile.objs | 1 + block/monitor/Makefile.objs | 1 + .../monitor/block-hmp-cmds.c | 3 ++- include/block/block-hmp-cmds.h | 16 ++++++++++++++++ include/sysemu/sysemu.h | 3 --- monitor/misc.c | 1 + 8 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 block/monitor/Makefile.objs rename device-hotplug.c =3D> block/monitor/block-hmp-cmds.c (97%) create mode 100644 include/block/block-hmp-cmds.h diff --git a/MAINTAINERS b/MAINTAINERS index 36d0c6887a..d881ba7d9c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1920,6 +1920,7 @@ Block QAPI, monitor, command line M: Markus Armbruster S: Supported F: blockdev.c +F: blockdev-hmp-cmds.c F: block/qapi.c F: qapi/block*.json F: qapi/transaction.json diff --git a/Makefile.objs b/Makefile.objs index e288663d89..40d3a1696c 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -48,7 +48,7 @@ common-obj-y +=3D dump/ common-obj-y +=3D job-qmp.o common-obj-y +=3D monitor/ common-obj-y +=3D net/ -common-obj-y +=3D qdev-monitor.o device-hotplug.o +common-obj-y +=3D qdev-monitor.o common-obj-$(CONFIG_WIN32) +=3D os-win32.o common-obj-$(CONFIG_POSIX) +=3D os-posix.o =20 diff --git a/block/Makefile.objs b/block/Makefile.objs index cb36ae2503..3635b6b4c1 100644 --- a/block/Makefile.objs +++ b/block/Makefile.objs @@ -45,6 +45,7 @@ block-obj-y +=3D crypto.o block-obj-y +=3D aio_task.o block-obj-y +=3D backup-top.o block-obj-y +=3D filter-compress.o +common-obj-y +=3D monitor/ =20 block-obj-y +=3D stream.o =20 diff --git a/block/monitor/Makefile.objs b/block/monitor/Makefile.objs new file mode 100644 index 0000000000..0a74f9a8b5 --- /dev/null +++ b/block/monitor/Makefile.objs @@ -0,0 +1 @@ +common-obj-y +=3D block-hmp-cmds.o diff --git a/device-hotplug.c b/block/monitor/block-hmp-cmds.c similarity index 97% rename from device-hotplug.c rename to block/monitor/block-hmp-cmds.c index 554e4d98db..bcf35b4b44 100644 --- a/device-hotplug.c +++ b/block/monitor/block-hmp-cmds.c @@ -1,5 +1,5 @@ /* - * QEMU device hotplug helpers + * Blockdev HMP commands * * Copyright (c) 2004 Fabrice Bellard * @@ -33,6 +33,7 @@ #include "sysemu/sysemu.h" #include "monitor/monitor.h" #include "block/block_int.h" +#include "block/block-hmp-cmds.h" =20 =20 void hmp_drive_add(Monitor *mon, const QDict *qdict) diff --git a/include/block/block-hmp-cmds.h b/include/block/block-hmp-cmds.h new file mode 100644 index 0000000000..0db8a889a1 --- /dev/null +++ b/include/block/block-hmp-cmds.h @@ -0,0 +1,16 @@ +/* + * HMP commands related to the block layer + * + * Copyright (c) 2020 Red Hat, Inc. + * + * This work is licensed under the terms of the GNU GPL, version 2. + * or (at your option) any later version. + * See the COPYING file in the top-level directory. + */ + +#ifndef BLOCK_HMP_COMMANDS_H +#define BLOCK_HMP_COMMANDS_H + +void hmp_drive_add(Monitor *mon, const QDict *qdict); + +#endif diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 479d90bcea..ef81302e1a 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -63,9 +63,6 @@ extern int nb_option_roms; extern const char *prom_envs[MAX_PROM_ENVS]; extern unsigned int nb_prom_envs; =20 -/* generic hotplug */ -void hmp_drive_add(Monitor *mon, const QDict *qdict); - /* pcie aer error injection */ void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict); =20 diff --git a/monitor/misc.c b/monitor/misc.c index 1748ab3911..c3bc34c099 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -66,6 +66,7 @@ #include "qemu/option.h" #include "qemu/thread.h" #include "block/qapi.h" +#include "block/block-hmp-cmds.h" #include "qapi/qapi-commands-char.h" #include "qapi/qapi-commands-control.h" #include "qapi/qapi-commands-migration.h" --=20 2.17.2