diff options
author | trini@kernel.crashing.org <trini@kernel.crashing.org> | 2004-08-10 00:50:21 -0700 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:36:59 -0700 |
commit | eb6c7cd03635ffc28798734f0b87b9e21dae6f9e (patch) | |
tree | 0bd2587399783c7fa82439772ae114bda931bb44 /udev-add.c | |
parent | 807755776d294a9811c0c8e835538e83abf734bc (diff) |
[PATCH] Make udev/udevstart be one binary
Hi,
The following patch makes udev/udevstart be a common binary. First,
doing this grows udev by a total of 1.8kB (ppc32, stripped) whereas
udevstart by itself is 6.4kB. I know you mentioned being able to
replace udevstart with a script, but at 1.8kB I don't think it'll be
easy to beat this with size there. Next, the following are by-eye
timings of before, after, and with devfs on a slow, but still usable
embedded platform (config stripped down to more-or-less bare for
ramdisk):
-- Embedded Planet RPX LITE, 64Mhz MPC 823e --
devfs : 15.333s, 15.253s, 14.988s (15.191s avg)
udev-pristine : 18.675s, 18.079s, 18.418s (18.390s avg)
udev-multi : 14.587s, 14.747s, 14.868s (14.734s avg)
The patch ends up being rather large to add this, as in doing so I ended
up making all refs (that I hit..) to devpath/subsystem be marked as
'const'.
Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'udev-add.c')
-rw-r--r-- | udev-add.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/udev-add.c b/udev-add.c index 900e4795aa..1f69329788 100644 --- a/udev-add.c +++ b/udev-add.c @@ -316,7 +316,7 @@ error: return -1; } -static struct sysfs_class_device *get_class_dev(char *device_name) +static struct sysfs_class_device *get_class_dev(const char *device_name) { char dev_path[SYSFS_PATH_MAX]; struct sysfs_class_device *class_dev = NULL; @@ -341,7 +341,7 @@ exit: * If it doesn't happen in about 10 seconds, give up. */ #define SECONDS_TO_WAIT_FOR_FILE 10 -static int sleep_for_file(char *path, char* file) +static int sleep_for_file(const char *path, char* file) { char filename[SYSFS_PATH_MAX + 6]; int loop = SECONDS_TO_WAIT_FOR_FILE; @@ -395,7 +395,7 @@ static int rename_net_if(struct udevice *dev, int fake) return retval; } -int udev_add_device(char *path, char *subsystem, int fake) +int udev_add_device(const char *path, const char *subsystem, int fake) { struct sysfs_class_device *class_dev; struct udevice dev; |