public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Paul.Clements@steeleye.com
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/block/nbd.c: don't defer compile error to runtime
Date: Sat, 3 Sep 2005 00:10:59 +0200	[thread overview]
Message-ID: <20050902221059.GY3657@stusta.de> (raw)

If we can detect a problem at compile time, the compilation should fail.


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.13-mm1-full/drivers/block/nbd.c.old	2005-09-02 23:48:27.000000000 +0200
+++ linux-2.6.13-mm1-full/drivers/block/nbd.c	2005-09-02 23:53:47.000000000 +0200
@@ -644,8 +644,8 @@
 	int i;
 
 	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();
 	}
 
 	if (nbds_max > MAX_NBD) {


             reply	other threads:[~2005-09-02 22:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-02 22:10 Adrian Bunk [this message]
2005-09-02 23:20 ` [2.6 patch] drivers/block/nbd.c: don't defer compile error to runtime Adam Kropelin
2005-09-02 23:24   ` Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2006-02-20 22:36 Adrian Bunk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050902221059.GY3657@stusta.de \
    --to=bunk@stusta.de \
    --cc=Paul.Clements@steeleye.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox