summaryrefslogtreecommitdiff
path: root/udev_multiplex.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-03-04 21:33:57 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:39:48 -0700
commitf0308095c78fd68c29be9b3b391bc1c077afa04c (patch)
tree3a932afd373dd9b2ea447f392acf1dbf7392b037 /udev_multiplex.c
parent03cfa1394fcc2c4386f8af22e5a4d9fdd7cecc50 (diff)
[PATCH] remove typedef for call_foreach_file() handler function
Diffstat (limited to 'udev_multiplex.c')
-rw-r--r--udev_multiplex.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/udev_multiplex.c b/udev_multiplex.c
index 3a484068ff..6d7852dbc0 100644
--- a/udev_multiplex.c
+++ b/udev_multiplex.c
@@ -31,11 +31,10 @@
#include "udev_utils.h"
#include "logging.h"
-static int run_program(const char *filename, void *data)
+static int run_program(struct udevice *udev, const char *filename)
{
pid_t pid;
int fd;
- struct udevice *udev = data;
dbg("running %s", filename);
@@ -89,7 +88,7 @@ void udev_multiplex_directory(struct udevice *udev, const char *basedir, const c
if (strcmp(devname, udev->subsystem) != 0) {
snprintf(dirname, PATH_MAX, "%s/%s", basedir, devname);
dirname[PATH_MAX-1] = '\0';
- call_foreach_file(run_program, dirname, suffix, udev);
+ call_foreach_file(run_program, udev, dirname, suffix);
}
temp[0] = '/';
@@ -101,16 +100,16 @@ void udev_multiplex_directory(struct udevice *udev, const char *basedir, const c
if (udev->name[0] != '\0') {
snprintf(dirname, PATH_MAX, "%s/%s", basedir, udev->name);
dirname[PATH_MAX-1] = '\0';
- call_foreach_file(run_program, dirname, suffix, udev);
+ call_foreach_file(run_program, udev, dirname, suffix);
}
if (udev->subsystem[0] != '\0') {
snprintf(dirname, PATH_MAX, "%s/%s", basedir, udev->subsystem);
dirname[PATH_MAX-1] = '\0';
- call_foreach_file(run_program, dirname, suffix, udev);
+ call_foreach_file(run_program, udev, dirname, suffix);
}
snprintf(dirname, PATH_MAX, "%s/default", basedir);
dirname[PATH_MAX-1] = '\0';
- call_foreach_file(run_program, dirname, suffix, udev);
+ call_foreach_file(run_program, udev, dirname, suffix);
}