qemu/qom
Kevin Wolf 0bd5a2eb79 qom: Check for wellformed id in user_creatable_add_type()
Most code paths for creating a user creatable object go through
QemuOpts, which ensures that the provided 'id' option is actually a
valid identifier.

However, there are some code paths that don't go through QemuOpts:
qemu-storage-daemon --object (since commit 8db1efd3) and QMP object-add
(since it was first introduced in commit cff8b2c6). We need to have the
same validity check for those, too.

This adds the check and makes it print the same error message as
QemuOpts on failure.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20210302171623.49709-1-kwolf@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-03-06 11:41:54 +01:00
..
container.c qom/container: remove .instance_size initializer from container_info 2020-06-10 12:09:59 -04:00
meson.build qom: Move the creation of the library to the main meson.build 2020-10-12 11:50:20 -04:00
object_interfaces.c qom: Check for wellformed id in user_creatable_add_type() 2021-03-06 11:41:54 +01:00
object.c qom/object.c: Fix typo 2021-02-25 14:14:33 +01:00
qom-hmp-cmds.c qobject: Change qobject_to_json()'s value to GString 2020-12-19 10:38:43 +01:00
qom-qmp-cmds.c qapi: Use QAPI_LIST_PREPEND() where possible 2020-12-19 10:20:14 +01:00
qom-qobject.c error: Eliminate error_propagate() manually 2020-07-10 15:18:08 +02:00
trace-events
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00