[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/29] include: move include/qapi/qmp/ to include/qobject/
From: |
Zhao Liu |
Subject: |
Re: [PATCH 01/29] include: move include/qapi/qmp/ to include/qobject/ |
Date: |
Tue, 16 Jan 2024 11:34:15 +0800 |
On Mon, Jan 08, 2024 at 06:46:38PM +0000, Daniel P. Berrangé wrote:
> Date: Mon, 8 Jan 2024 18:46:38 +0000
> From: "Daniel P. Berrangé" <berrange@redhat.com>
> Subject: Re: [PATCH 01/29] include: move include/qapi/qmp/ to
> include/qobject/
>
> On Mon, Jan 08, 2024 at 06:23:37PM +0000, Daniel P. Berrangé wrote:
> > The general expectation is that header files should follow the same
> > file/path naming scheme as the corresponding source file. There are
> > various historical exceptions to this practice in QEMU, with one of
> > the most notable being the include/qapi/qmp/ directory. Most of the
> > headers there correspond to source files in qobject/.
> >
> > This patch corrects that inconsistency by creating include/qobject/.
> > The only outlier is include/qapi/qmp/dispatch.h which gets renamed
> > to include/qapi/qmp-registry.h.
> >
> > To allow the code to continue to build, symlinks are temporarily
> > added in $QEMU/qapi/qmp/ to point to the new location. They will
> > be removed in a later commit.
> >
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> > MAINTAINERS | 5 +----
> > include/qapi/{qmp/dispatch.h => qmp-registry.h} | 0
> > include/{qapi/qmp => qobject}/json-parser.h | 0
> > include/{qapi/qmp => qobject}/json-writer.h | 0
> > include/{qapi/qmp => qobject}/qbool.h | 0
> > include/{qapi/qmp => qobject}/qdict.h | 0
> > include/{qapi/qmp => qobject}/qerror.h | 0
>
> Of course just after sending this I decided that moving qerror.h
> to qobject/ is probably not optimal. It only contains a set of
> (deprecated) error message strings. Perhaps it could just move
> from qapi/qmp/qerror.h to just qapi/qerror.h ? Other suggestions ?
>From the naming style ("q" + module name) and the content comments
(descripted as a module), qerror.h (as an error module starting with
q) seems to be more neatly put together with other qmodules such as
qbool.h, qdirct.h, qlist.h, etc.
There is already an error.h under the include/qapi, which is supposed
to be the developer's first choice, and it seems a bit confusing to
have qerror.h in the same directory as error.h (even though it states
that qerror.h will be deprecated)?
Regards,
Zhao
>
> > include/{qapi/qmp => qobject}/qjson.h | 0
> > include/{qapi/qmp => qobject}/qlist.h | 0
> > include/{qapi/qmp => qobject}/qlit.h | 0
> > include/{qapi/qmp => qobject}/qnull.h | 0
> > include/{qapi/qmp => qobject}/qnum.h | 0
> > include/{qapi/qmp => qobject}/qobject.h | 0
> > include/{qapi/qmp => qobject}/qstring.h | 0
>
> With regards,
> Daniel
> --
> |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o- https://fstop138.berrange.com :|
> |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
>
>
- [PATCH 00/29] include: move include/qapi/qmp/ to include/qobject/, Daniel P . Berrangé, 2024/01/08
- [PATCH 03/29] authz: adapt to new import path for qobject data type headers, Daniel P . Berrangé, 2024/01/08
- [PATCH 01/29] include: move include/qapi/qmp/ to include/qobject/, Daniel P . Berrangé, 2024/01/08
- [PATCH 02/29] audio: adapt to new import path for qobject data type headers, Daniel P . Berrangé, 2024/01/08
- [PATCH 07/29] docs: adapt to new import path for qobject data type headers, Daniel P . Berrangé, 2024/01/08
- [PATCH 05/29] backends: adapt to new import path for qobject data type headers, Daniel P . Berrangé, 2024/01/08
- [PATCH 04/29] block: adapt to new import path for qobject data type headers, Daniel P . Berrangé, 2024/01/08
- [PATCH 06/29] chardev: adapt to new import path for qobject data type headers, Daniel P . Berrangé, 2024/01/08
- [PATCH 10/29] include: adapt to new import path for qobject data type headers, Daniel P . Berrangé, 2024/01/08
- [PATCH 08/29] dump: adapt to new import path for qobject data type headers, Daniel P . Berrangé, 2024/01/08
- [PATCH 09/29] hw: adapt to new import path for qobject data type headers, Daniel P . Berrangé, 2024/01/08
- [PATCH 11/29] migration: adapt to new import path for qobject data type headers, Daniel P . Berrangé, 2024/01/08
- [PATCH 13/29] net: adapt to new import path for qobject data type headers, Daniel P . Berrangé, 2024/01/08