netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Huth <mhuth@mvista.com>
To: Dan Aloni <da-x@gmx.net>
Cc: Linux Net-Dev <netdev@oss.sgi.com>, "David S. Miller" <davem@redhat.com>
Subject: Re: [PATCH] network device renaming sysfs fix
Date: Fri, 15 Aug 2003 11:09:34 -0700	[thread overview]
Message-ID: <3F3D21DE.50906@mvista.com> (raw)
In-Reply-To: 20030815111514.GA5228@callisto.yi.org

Agreed.  We had not yet found the class_device_rename.
Hopefully, this is no longer in HTML format.
By all means, help not to look like a bozo :-)  - a tall order, I realize.

Mark Huth

Dan Aloni wrote:

>(repost, now will hopefully reach the mailing list)
>
>I believe this is a better approach for fixing the sysfs renaming
>discrepancy. Later I'll also look into fixing the same issue 
>with sysctl.
>
>--- linux/net/core/dev.c	2003-08-15 12:47:50.000000000 +0300
>+++ linux/net/core/dev.c	2003-08-15 12:47:59.000000000 +0300
>@@ -2347,10 +2347,14 @@
> 				return -EEXIST;
> 			memcpy(dev->name, ifr->ifr_newname, IFNAMSIZ);
> 			dev->name[IFNAMSIZ - 1] = 0;
>-			strlcpy(dev->class_dev.class_id, dev->name, BUS_ID_SIZE);
>+
>+			err = class_device_rename(&dev->class_dev, dev->name);
>+			if (err) 
>+				printk(KERN_DEBUG "SIOCSIFNAME: error renaming class_device (%d)\n", err);
>+
> 			notifier_call_chain(&netdev_chain,
> 					    NETDEV_CHANGENAME, dev);
>-			return 0;
>+			return err;
> 
> 		/*
> 		 *	Unknown or private ioctl
>
>
>
>  
>

  parent reply	other threads:[~2003-08-15 18:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-15 11:15 [PATCH] network device renaming sysfs fix Dan Aloni
2003-08-15 16:37 ` Stephen Hemminger
2003-08-15 16:50   ` Dan Aloni
2003-08-16 14:40   ` David S. Miller
2003-08-17  7:13     ` Dan Aloni
2003-08-15 18:09 ` Mark Huth [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-08-15 11:36 Hen, Shmulik
2003-08-15 11:45 ` Dan Aloni

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=3F3D21DE.50906@mvista.com \
    --to=mhuth@mvista.com \
    --cc=da-x@gmx.net \
    --cc=davem@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).