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

Reply via email to