[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/3] SMBIOS table passthrough support



> -static void validate_hvm_info(struct hvm_info_table *t)
> +static int validate_hvm_info_table(uint8_t *table, uint32_t
> table_length,
> +    const char *table_sig, const char *sig)
>  {
> -    uint8_t *ptr = (uint8_t *)t;
>      uint8_t sum = 0;
>      int i;
>  
> -    if ( strncmp(t->signature, "HVM INFO", 8) )
> +    if (table_length == 0)
> +        printf("Empty HVM info table: %.*s\n", 8, sig);
> +
> +    /* NOTE made this a common routine to validate all HVM tables.
> Removed 
> +       BUG() on failure in here - let the caller decide if a checksum
> failure
> +       warrants that */

I think comments about what code looked like historically, what changed
and why belong in the commit message, not inline in the code.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.