On 10/04/2025 17.09, Shalini Chellathurai Saroja wrote:
Add Control-Program Identification data to the QEMU Object
Model (QOM), along with the timestamp in which the data was received.
...
diff --git a/hw/s390x/sclpcpi.c b/hw/s390x/sclpcpi.c
index 13589459b1..dcc8bd3245 100644
--- a/hw/s390x/sclpcpi.c
+++ b/hw/s390x/sclpcpi.c
@@ -18,7 +18,10 @@
    */
#include "qemu/osdep.h"
+#include "qemu/timer.h"
  #include "hw/s390x/event-facility.h"
+#include "hw/s390x/ebcdic.h"
+#include "qapi/qapi-visit-machine.h"
typedef struct Data {
      uint8_t id_format;
@@ -58,11 +61,39 @@ static int write_event_data(SCLPEvent *event, 
EventBufferHeader *evt_buf_hdr)
  {
      ControlProgramIdMsg *cpim = container_of(evt_buf_hdr, ControlProgramIdMsg,
                                               ebh);
+    SCLPEventCPI *e = SCLP_EVENT_CPI(event);
+
+    ascii_put(e->cpi.system_type, (char *)cpim->data.system_type, 8);
+    ascii_put(e->cpi.system_name, (char *)cpim->data.system_name, 8);
+    ascii_put(e->cpi.sysplex_name, (char *)cpim->data.sysplex_name, 8);

Would it be possible to use sizeof() instead of hard-coding "8" here?

 Thanks,
  Thomas



Reply via email to