Skip to content
  • Kevin Wolf's avatar
    0bd5a2eb
    qom: Check for wellformed id in user_creatable_add_type() · 0bd5a2eb
    Kevin Wolf authored
    
    
    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: default avatarKevin Wolf <kwolf@redhat.com>
    Message-Id: <20210302171623.49709-1-kwolf@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    0bd5a2eb
    qom: Check for wellformed id in user_creatable_add_type()
    Kevin Wolf authored
    
    
    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: default avatarKevin Wolf <kwolf@redhat.com>
    Message-Id: <20210302171623.49709-1-kwolf@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading