diff options
author | Eduardo Habkost | 2020-09-03 22:43:22 +0200 |
---|---|---|
committer | Eduardo Habkost | 2020-09-09 15:26:43 +0200 |
commit | db1015e92e04835c9eb50c29625fe566d1202dbd (patch) | |
tree | 41fbc0bf3e3f29b7ecb339224a049e3f2a7db8fa /include/hw/fw-path-provider.h | |
parent | Delete duplicate QOM typedefs (diff) | |
download | qemu-db1015e92e04835c9eb50c29625fe566d1202dbd.tar.gz qemu-db1015e92e04835c9eb50c29625fe566d1202dbd.tar.xz qemu-db1015e92e04835c9eb50c29625fe566d1202dbd.zip |
Move QOM typedefs and add missing includes
Some typedefs and macros are defined after the type check macros.
This makes it difficult to automatically replace their
definitions with OBJECT_DECLARE_TYPE.
Patch generated using:
$ ./scripts/codeconverter/converter.py -i \
--pattern=QOMStructTypedefSplit $(git grep -l '' -- '*.[ch]')
which will split "typdef struct { ... } TypedefName"
declarations.
Followed by:
$ ./scripts/codeconverter/converter.py -i --pattern=MoveSymbols \
$(git grep -l '' -- '*.[ch]')
which will:
- move the typedefs and #defines above the type check macros
- add missing #include "qom/object.h" lines if necessary
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20200831210740.126168-9-ehabkost@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20200831210740.126168-10-ehabkost@redhat.com>
Message-Id: <20200831210740.126168-11-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/hw/fw-path-provider.h')
-rw-r--r-- | include/hw/fw-path-provider.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/hw/fw-path-provider.h b/include/hw/fw-path-provider.h index 10d1bd4959..1231cca63b 100644 --- a/include/hw/fw-path-provider.h +++ b/include/hw/fw-path-provider.h @@ -22,6 +22,7 @@ #define TYPE_FW_PATH_PROVIDER "fw-path-provider" +typedef struct FWPathProviderClass FWPathProviderClass; #define FW_PATH_PROVIDER_CLASS(klass) \ OBJECT_CLASS_CHECK(FWPathProviderClass, (klass), TYPE_FW_PATH_PROVIDER) #define FW_PATH_PROVIDER_GET_CLASS(obj) \ @@ -31,11 +32,11 @@ typedef struct FWPathProvider FWPathProvider; -typedef struct FWPathProviderClass { +struct FWPathProviderClass { InterfaceClass parent_class; char *(*get_dev_path)(FWPathProvider *p, BusState *bus, DeviceState *dev); -} FWPathProviderClass; +}; char *fw_path_provider_get_dev_path(FWPathProvider *p, BusState *bus, DeviceState *dev); |