[PATCH] Remove newline from pci MODALIAS variable

From: Hannes Reinecke
Date: Tue Jun 28 2005 - 08:00:22 EST


Hi Greg,

the pci core sends out a hotplug event variable MODALIAS with a trailing
newline. This is inconsistent with all other event variables and breaks
some hotplug tools. This patch removes the said newline.

Please apply.

Cheers,

Hannes
--
Dr. Hannes Reinecke hare@xxxxxxx
SuSE Linux AG S390 & zSeries
Maxfeldstraße 5 +49 911 74053 688
90409 Nürnberg http://www.suse.de
From: Hannes Reinecke <hare@xxxxxxx>
Subject: Remove newline from MODALIAS

PCI hotplug events carry a newline in the MODALIAS variable.
This confuses scripts unneccesarily.

--- linux-2.6.12/drivers/pci/hotplug.c.orig 2005-06-23 09:33:03.000000000 +0200
+++ linux-2.6.12/drivers/pci/hotplug.c 2005-06-23 09:33:16.000000000 +0200
@@ -54,7 +54,7 @@ int pci_hotplug (struct device *dev, cha

envp[i++] = scratch;
length += scnprintf (scratch, buffer_size - length,
- "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x\n",
+ "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x",
pdev->vendor, pdev->device,
pdev->subsystem_vendor, pdev->subsystem_device,
(u8)(pdev->class >> 16), (u8)(pdev->class >> 8),