All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luk Claes <luk@debian.org>
To: Jim Rees <rees@umich.edu>
Cc: NeilBrown <neilb@suse.de>, Steve Dickson <SteveD@redhat.com>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH] Do not segfault because of kernel version
Date: Sun, 03 Jul 2011 15:28:49 +0200	[thread overview]
Message-ID: <4E106E91.8080208@debian.org> (raw)
In-Reply-To: <20110703132605.GC9889@merit.edu>

On 07/03/2011 03:26 PM, Jim Rees wrote:
> Luk Claes wrote:
> 
>   > You can't return -1 from a function returning unsigned int.  I think you
>   > want to return something like
>   > 
>   > MAKE_VERSION(9999, 255, 255)
>   
>   Would it not be better to return UINT_MAX in that case to avoid having
>   to change it when version 10000 would be released and to avoid overflows
>   that could potentially order lower?
> 
> Maybe.  I wanted the second and third numbers to be the max possible (255).
> But of course they will be anyway if you return UINT_MAX and are running on
> an architecture that represents ints in two's complement binary.  Which is
> the case today, but wasn't there a port of unix to the System 36 at one
> time?  Ok, that's just silly.
> 
> Yes, just return UINT_MAX.  Fix the other error return too, the one where
> uname fails.  And put in a comment if you can briefly summarize Linus's
> argument.

I thought that a real error like uname failing should still get the
'wrong' return 0, no?

Cheers

Luk

  reply	other threads:[~2011-07-03 13:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-02 14:32 [PATCH] Do not segfault because of kernel version Luk Claes
2011-07-03  5:04 ` NeilBrown
2011-07-03  6:37   ` Luk Claes
2011-07-03 13:02     ` Jim Rees
2011-07-03 13:10       ` Luk Claes
2011-07-03 13:26         ` Jim Rees
2011-07-03 13:28           ` Luk Claes [this message]
2011-07-03 14:11             ` Jim Rees
2011-07-04 16:28               ` Luk Claes
2011-07-04 19:00                 ` Jim Rees
2011-07-05  5:42                   ` Luk Claes
2011-07-05  5:42                     ` Luk Claes
2011-07-12 14:42                       ` Steve Dickson

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=4E106E91.8080208@debian.org \
    --to=luk@debian.org \
    --cc=SteveD@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=rees@umich.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.