From: Stephen Hemminger <shemminger@osdl.org>
To: "David S. Miller" <davem@redhat.com>
Cc: jt@hpl.hp.com, jt@bougret.hpl.hp.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:13:24 -0800 [thread overview]
Message-ID: <20040114161324.61b7198f.shemminger@osdl.org> (raw)
In-Reply-To: <20040113162112.509edb71.davem@redhat.com>
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);
}
next prev parent reply other threads:[~2004-01-15 0:14 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 [this message]
2004-01-15 0:17 ` Jean Tourrilhes
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=20040114161324.61b7198f.shemminger@osdl.org \
--to=shemminger@osdl.org \
--cc=davem@redhat.com \
--cc=jgarzik@pobox.com \
--cc=jt@bougret.hpl.hp.com \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
/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
all inboxes | Powered by JetHome®