From 4a539daf1e5daa17b52239478d97f8dc7a6506b6 Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Sat, 27 Mar 2004 01:21:46 -0800 Subject: [PATCH] dev_d.c file sorting and cleanup On Thu, Mar 25, 2004 at 02:52:13AM +0100, Kay Sievers wrote: > Please have look if it still works for you, I only did a very quick > test. Here is a unified version, with all the functions moved to udev_lib.c. We have a generic function now, to call a given fnct(char *) for every file ending with a specific suffix, sorted in lexical order. We use it to execute the dev.d/ files and read our rules.d/ files. The binary should be a bit smaller now. I've also changed it, to not do the dev.d/ exec for net devices. --- udev_lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'udev_lib.h') diff --git a/udev_lib.h b/udev_lib.h index 90a42ffe96..e412ba96f4 100644 --- a/udev_lib.h +++ b/udev_lib.h @@ -75,6 +75,7 @@ extern char get_device_type(const char *path, const char *subsystem); extern int file_map(const char *filename, char **buf, size_t *bufsize); extern void file_unmap(char *buf, size_t bufsize); extern size_t buf_get_line(char *buf, size_t buflen, size_t cur); +extern int call_foreach_file(int fnct(char *f) , char *filename, char *extension); #endif -- cgit v1.2.3-54-g00ecf