linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: [ANNOUNCE] udev 003 release
Date: Fri, 17 Oct 2003 18:27:54 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-106641569832686@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-106637061520169@msgid-missing>

On Fri, Oct 17, 2003 at 11:19:23AM -0700, Greg KH wrote:
> 
> Ah, yeah, udev seg faults right now for partitions.  Let me try to track
> down the bug, give me a bit of time...

Here's a patch that fixes the partition logic for me.  Sorry about this, I
need to make sure to test partitions more next time.

thanks again for testing this.

greg k-h

# fix segfaults when dealing with partitions.

diff -Nru a/udev-add.c b/udev-add.c
--- a/udev-add.c	Fri Oct 17 11:26:37 2003
+++ b/udev-add.c	Fri Oct 17 11:26:37 2003
@@ -169,13 +169,13 @@
 	}
 	memset(&dbdev, 0, sizeof(dbdev));
 	strncpy(dbdev.name, attr.name, NAME_SIZE);
-	strncpy(dbdev.sysfs_path, class_dev->sysdevice->directory->path,
-		PATH_SIZE);
+	if (class_dev->sysdevice) {
+		strncpy(dbdev.sysfs_path, class_dev->sysdevice->directory->path, PATH_SIZE);
+		strncpy(dbdev.bus_id, class_dev->sysdevice->bus_id, ID_SIZE);
+	}
 	strncpy(dbdev.class_dev_name, class_dev->name, NAME_SIZE);
-	if ((sysfs_get_name_from_path(subsystem, dbdev.class_name, NAME_SIZE))
-	    != 0)
+	if ((sysfs_get_name_from_path(subsystem, dbdev.class_name, NAME_SIZE)) != 0)
 		strcpy(dbdev.class_name, "unkown");
-	strncpy(dbdev.bus_id, class_dev->sysdevice->bus_id, ID_SIZE);
 	strcpy(dbdev.bus_name, "unknown");
 	if (class_dev->driver != NULL)
 		strncpy(dbdev.driver, class_dev->driver->name, NAME_SIZE);


-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2003-10-17 18:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-17  5:56 [ANNOUNCE] udev 003 release Greg KH
2003-10-17  6:32 ` Clemens Schwaighofer
2003-10-17 17:57 ` clemens
2003-10-17 18:19 ` Greg KH
2003-10-17 18:27 ` Greg KH [this message]
2003-10-18 14:56 ` Kay Sievers
2003-10-19 21:01 ` Greg KH
2003-10-20  2:53 ` Kay Sievers
2003-10-20 10:14 ` Kay Sievers
2003-10-20 22:35 ` Greg KH
2003-10-21  0:50 ` Greg KH
2003-10-21  2:43 ` Greg KH
2003-10-21 17:44 ` Greg KH
2003-10-21 20:56 ` Greg KH

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=marc-linux-hotplug-106641569832686@msgid-missing \
    --to=greg@kroah.com \
    --cc=linux-hotplug@vger.kernel.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).