From: Stephen Hemminger <shemminger@vyatta.com>
To: Octavian Purdila <opurdila@ixiacom.com>
Cc: netdev@vger.kernel.org
Subject: Re: [net-next-2.6 PATCH] net: device name allocation cleanups
Date: Tue, 17 Nov 2009 16:46:33 -0800 [thread overview]
Message-ID: <20091117164633.49e5fa44@nehalam> (raw)
In-Reply-To: <200911172233.53119.opurdila@ixiacom.com>
On Tue, 17 Nov 2009 22:33:53 +0200
Octavian Purdila <opurdila@ixiacom.com> wrote:
> + if (fmt) {
> + if (strchr(name, '%'))
> + return __dev_alloc_name(net, name, buf);
> + }
> +
> + if (__dev_get_by_name(net, name))
Flatten this logic out.
if (fmt && strchr(name, '%'))
return __dev_alloc_name(net, name, buf);
else if (__dev_get_by_name(net, name))
return -EEXIST;
else if (buf != name)
strlcpy(buf, name, IFNAMSIZ);
return 0;
next prev parent reply other threads:[~2009-11-18 0:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-17 16:49 [net-next-2.6 PATCH] net: device name allocation cleanups Octavian Purdila
2009-11-17 17:01 ` Stephen Hemminger
2009-11-17 20:33 ` Octavian Purdila
2009-11-18 0:42 ` Stephen Hemminger
2009-11-18 0:46 ` Stephen Hemminger [this message]
2009-11-18 12:36 ` Octavian Purdila
2009-11-18 13:07 ` David 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=20091117164633.49e5fa44@nehalam \
--to=shemminger@vyatta.com \
--cc=netdev@vger.kernel.org \
--cc=opurdila@ixiacom.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;
as well as URLs for NNTP newsgroup(s).