于 2012-8-29 19:12, Paolo Bonzini 写道:
Il 29/08/2012 13:03, Wenchao Xia ha scritto:

+struct QBlockOption_prot_file {
+    char *filename;
+};
+
+union QBlockOption_prot {
+    struct QBlockOption_prot_file o_file;
+};
+
+/**
+ * struct QBlockOptionLoc: contains information about how to find the image
+ *
+ * @prot_type: protocol type, now only support FILE.
+ * @prot_op: protocol related options.
+ */
+struct QBlockOptionLoc {
+    enum QBlockProtocol prot_type;
+    union QBlockOption_prot prot_op;
+    uint8_t reserved[512];

The padding must be part of the union, not the struct.

Paolo

  right. I missed the point.

--
Best Regards

Wenchao Xia


Reply via email to