Skip to content

Commit

Permalink
[PATCH] keep pnpbios usermod_helper away from hotplug_path[]
Browse files Browse the repository at this point in the history
These days we use udev to manage all kernel events. /proc/sys/kernel/hotplug
will usually be disabled by an init-script. pnpnbios is not integrated with
the driver core and should stay away from the now disabled /sbin/hotplug.

Set the helper to /sbin/phpbios, even when there is probably no current
user of this faciliy. If it's needed, it should definitely get proper driver
core integration instead of forking binaries from the kernel.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Kay Sievers authored and Greg Kroah-Hartman committed Jan 5, 2006
1 parent 8802684 commit 0343821
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/pnp/pnpbios/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
#include <linux/mm.h>
#include <linux/smp.h>
#include <linux/slab.h>
#include <linux/kobject_uevent.h>
#include <linux/completion.h>
#include <linux/spinlock.h>
#include <linux/dmi.h>
Expand Down Expand Up @@ -106,8 +105,6 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info)
char *argv [3], **envp, *buf, *scratch;
int i = 0, value;

if (!hotplug_path [0])
return -ENOENT;
if (!current->fs->root) {
return -EAGAIN;
}
Expand All @@ -119,8 +116,9 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info)
return -ENOMEM;
}

/* only one standardized param to hotplug command: type */
argv [0] = hotplug_path;
/* FIXME: if there are actual users of this, it should be integrated into
* the driver core and use the usual infrastructure like sysfs and uevents */
argv [0] = "/sbin/pnpbios";
argv [1] = "dock";
argv [2] = NULL;

Expand Down

0 comments on commit 0343821

Please sign in to comment.