From 2af282ec51a27116d0402cab237b8970800f870c Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Mon, 24 Feb 2020 15:30:08 +0100 Subject: qemu-storage-daemon: Add --monitor option This adds and parses the --monitor option, so that a QMP monitor can be used in the storage daemon. The monitor offers commands defined in the QAPI schema at storage-daemon/qapi/qapi-schema.json. The --monitor options currently allows to create multiple monitors with the same ID. This part of the interface is considered unstable. We will reject such configurations as soon as we have a design for the monitor subsystem to perform these checks. (In the system emulator, we depend on QemuOpts rejecting duplicate IDs.) Signed-off-by: Kevin Wolf Message-Id: <20200224143008.13362-21-kwolf@redhat.com> Acked-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- scripts/qapi/gen.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/qapi') diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py index 33690bf..bf5552a 100644 --- a/scripts/qapi/gen.py +++ b/scripts/qapi/gen.py @@ -44,6 +44,11 @@ class QAPIGen: return '' def write(self, output_dir): + # Include paths starting with ../ are used to reuse modules of the main + # schema in specialised schemas. Don't overwrite the files that are + # already generated for the main schema. + if self.fname.startswith('../'): + return pathname = os.path.join(output_dir, self.fname) odir = os.path.dirname(pathname) if odir: -- cgit v1.1