Adrian Bunk wrote:
> If we can detect a problem at compile time, the compilation should
> fail.

[...] 

>       if (sizeof(struct nbd_request) != 28) {
> -             printk(KERN_CRIT "nbd: sizeof nbd_request needs to be 28 in 
> order to work!\n" );
> -             return -EIO;
> +             extern void nbd_request_wrong_size(void);
> +             nbd_request_wrong_size();

        BUILD_BUG_ON(sizeof(struct nbd_request) != 28);

...perhaps?

--Adam

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to