From: John Snow <jsnow@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 3/3] scripts/qmp/qom-fuse: Fix getattr(), read() for files in /
Date: Fri, 24 Jul 2020 12:58:28 -0400 [thread overview]
Message-ID: <d5ed4567-a7bd-c879-c240-787a4ddd814f@redhat.com> (raw)
In-Reply-To: <20200723142738.1868568-4-armbru@redhat.com>
On 7/23/20 10:27 AM, Markus Armbruster wrote:
> path, prop = "type".rsplit('/', 1) sets path to "", which doesn't
> work. Correct to "/".
>
BOTD. If it works for you, that's good news.
Reviewed-by: John Snow <jsnow@redhat.com>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> scripts/qmp/qom-fuse | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/qmp/qom-fuse b/scripts/qmp/qom-fuse
> index 405e6ebd67..7c7cff8edf 100755
> --- a/scripts/qmp/qom-fuse
> +++ b/scripts/qmp/qom-fuse
> @@ -45,8 +45,10 @@ class QOMFS(Operations):
> return False
>
> def is_property(self, path):
> + path, prop = path.rsplit('/', 1)
> + if path == '':
> + path = '/'
> try:
> - path, prop = path.rsplit('/', 1)
> for item in self.qmp.command('qom-list', path=path):
> if item['name'] == prop:
> return True
> @@ -55,8 +57,10 @@ class QOMFS(Operations):
> return False
>
> def is_link(self, path):
> + path, prop = path.rsplit('/', 1)
> + if path == '':
> + path = '/'
> try:
> - path, prop = path.rsplit('/', 1)
> for item in self.qmp.command('qom-list', path=path):
> if item['name'] == prop:
> if item['type'].startswith('link<'):
> @@ -71,6 +75,8 @@ class QOMFS(Operations):
> return -ENOENT
>
> path, prop = path.rsplit('/', 1)
> + if path == '':
> + path = '/'
> try:
> data = self.qmp.command('qom-get', path=path, property=prop)
> data += '\n' # make values shell friendly
>
next prev parent reply other threads:[~2020-07-24 16:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-23 14:27 [PATCH 0/3] scripts/qmp/qom-fuse: Scrape off the bitrot Markus Armbruster
2020-07-23 14:27 ` [PATCH 1/3] scripts/qmp/qom-fuse: Unbreak import of QEMUMonitorProtocol Markus Armbruster
2020-07-23 15:08 ` Philippe Mathieu-Daudé
2020-07-24 16:51 ` John Snow
2020-07-23 14:27 ` [PATCH 2/3] scripts/qmp/qom-fuse: Port to current Python module fuse Markus Armbruster
2020-07-24 16:56 ` John Snow
2020-07-27 7:09 ` Markus Armbruster
2020-07-23 14:27 ` [PATCH 3/3] scripts/qmp/qom-fuse: Fix getattr(), read() for files in / Markus Armbruster
2020-07-23 15:10 ` Philippe Mathieu-Daudé
2020-07-24 7:00 ` Markus Armbruster
2020-07-24 16:58 ` John Snow [this message]
2020-07-23 15:21 ` [PATCH 0/3] scripts/qmp/qom-fuse: Scrape off the bitrot Thomas Huth
2020-07-24 7:33 ` Status of scripts/qmp/ (was: [PATCH 0/3] scripts/qmp/qom-fuse: Scrape off the bitrot) Markus Armbruster
2020-07-24 8:10 ` Thomas Huth
2020-07-24 16:53 ` [PATCH 0/3] scripts/qmp/qom-fuse: Scrape off the bitrot John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d5ed4567-a7bd-c879-c240-787a4ddd814f@redhat.com \
--to=jsnow@redhat.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).