From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: "David S. Miller" <davem@redhat.com>,
jgarzik@pobox.com, netdev@oss.sgi.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.X] SIOCSIFNAME wilcard suppor & name validation
Date: Wed, 14 Jan 2004 16:17:12 -0800 [thread overview]
Message-ID: <20040115001712.GA24056@bougret.hpl.hp.com> (raw)
In-Reply-To: <20040114161324.61b7198f.shemminger@osdl.org>
On Wed, Jan 14, 2004 at 04:13:24PM -0800, Stephen Hemminger wrote:
> Bug: dev_alloc_name returns the number of the slot used, so comparison needs
> to be < 0.
>
> diff -Nru a/net/core/dev.c b/net/core/dev.c
> --- a/net/core/dev.c Wed Jan 14 16:09:02 2004
> +++ b/net/core/dev.c Wed Jan 14 16:09:02 2004
> @@ -718,7 +718,7 @@
>
> if (strchr(newname, '%')) {
> int err = dev_alloc_name(dev, newname);
> - if (err)
> + if (err < 0)
> return err;
> strcpy(newname, dev->name);
> }
Doh ! I feel stupid.
Jean
next prev parent reply other threads:[~2004-01-15 0:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-12 23:43 [PATCH 2.6.X] SIOCSIFNAME wilcard support Jean Tourrilhes
2004-01-13 22:22 ` [PATCH 2.6.X] SIOCSIFNAME wilcard suppor & name validation Stephen Hemminger
2004-01-13 22:27 ` Jean Tourrilhes
2004-01-14 0:21 ` David S. Miller
2004-01-15 0:13 ` Stephen Hemminger
2004-01-15 0:17 ` Jean Tourrilhes [this message]
2004-01-15 8:49 ` David S. Miller
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=20040115001712.GA24056@bougret.hpl.hp.com \
--to=jt@bougret.hpl.hp.com \
--cc=davem@redhat.com \
--cc=jgarzik@pobox.com \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
--cc=shemminger@osdl.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;
as well as URLs for NNTP newsgroup(s).