diff options
author | Thomas Huth | 2017-08-24 14:00:29 +0200 |
---|---|---|
committer | Cornelia Huck | 2017-08-30 18:23:26 +0200 |
commit | 3ea6d20e0baacb4a1211ed0ea57db14e2fc927ce (patch) | |
tree | 094f6b5b54a8d111ae281683a1fc2f53cec680bb /hw/s390x/s390-stattrib.c | |
parent | target/s390x: cleanup cpu.h (diff) | |
download | qemu-3ea6d20e0baacb4a1211ed0ea57db14e2fc927ce.tar.gz qemu-3ea6d20e0baacb4a1211ed0ea57db14e2fc927ce.tar.xz qemu-3ea6d20e0baacb4a1211ed0ea57db14e2fc927ce.zip |
s390x/s390-stattrib: Mark the storage attribute as not user_creatable
The storage attribute devices are only meant to be instantiated one
time, internally. They can not be used by the user, so mark them with
user_creatable = false.
Suggested-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1503576029-24264-1-git-send-email-thuth@redhat.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/s390x/s390-stattrib.c')
-rw-r--r-- | hw/s390x/s390-stattrib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c index 14a02711a2..2902f54f11 100644 --- a/hw/s390x/s390-stattrib.c +++ b/hw/s390x/s390-stattrib.c @@ -306,6 +306,7 @@ static int qemu_s390_get_active(S390StAttribState *sa) static void qemu_s390_stattrib_class_init(ObjectClass *oc, void *data) { S390StAttribClass *sa_cl = S390_STATTRIB_CLASS(oc); + DeviceClass *dc = DEVICE_CLASS(oc); sa_cl->synchronize = qemu_s390_synchronize_stub; sa_cl->get_stattr = qemu_s390_get_stattr_stub; @@ -314,6 +315,9 @@ static void qemu_s390_stattrib_class_init(ObjectClass *oc, void *data) sa_cl->set_migrationmode = qemu_s390_set_migrationmode_stub; sa_cl->get_dirtycount = qemu_s390_get_dirtycount_stub; sa_cl->get_active = qemu_s390_get_active; + + /* Reason: Can only be instantiated one time (internally) */ + dc->user_creatable = false; } static const TypeInfo qemu_s390_stattrib_info = { |