* Re: [ANNOUNCE] udev 046 release
2004-11-18 22:44 [ANNOUNCE] udev 046 release Greg KH
@ 2004-11-19 9:58 ` Alex Riesen
2004-11-19 10:00 ` Alex Riesen
` (6 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Alex Riesen @ 2004-11-19 9:58 UTC (permalink / raw)
To: linux-hotplug
On Thu, 18 Nov 2004 14:44:12 -0800, Greg KH <greg@kroah.com> wrote:
> I've released the 046 version of udev. It can be found at:
> kernel.org/pub/linux/utils/kernel/hotplug/udev-046.tar.gz
I just put const's at some places. It cut down data segments, but
increased code size.
Overall still smaller:
-rwxr-xr-x 1 user users 50420 Nov 19 10:53 ../udev-046/udev
-rwxr-xr-x 1 user users 49556 Nov 19 10:53 udev
text data bss dec hex filename
47245 968 22480 70693 11425 ../udev-046/udev
48089 104 22064 70257 11271 udev
Also, the instance of utsname in udev_lib.c is used only once.
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [ANNOUNCE] udev 046 release
2004-11-18 22:44 [ANNOUNCE] udev 046 release Greg KH
2004-11-19 9:58 ` Alex Riesen
@ 2004-11-19 10:00 ` Alex Riesen
2004-11-19 11:26 ` Mathieu Segaud
` (5 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Alex Riesen @ 2004-11-19 10:00 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
On Fri, 19 Nov 2004 10:58:53 +0100, Alex Riesen <raa.lkml@gmail.com> wrote:
> On Thu, 18 Nov 2004 14:44:12 -0800, Greg KH <greg@kroah.com> wrote:
> > I've released the 046 version of udev. It can be found at:
> > kernel.org/pub/linux/utils/kernel/hotplug/udev-046.tar.gz
>
> I just put const's at some places. It cut down data segments, but
> increased code size.
> Overall still smaller:
>
> -rwxr-xr-x 1 user users 50420 Nov 19 10:53 ../udev-046/udev
> -rwxr-xr-x 1 user users 49556 Nov 19 10:53 udev
> text data bss dec hex filename
> 47245 968 22480 70693 11425 ../udev-046/udev
> 48089 104 22064 70257 11271 udev
>
> Also, the instance of utsname in udev_lib.c is used only once.
forgot the patch...
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: udev-046-const.patch --]
[-- Type: text/x-patch; name="udev-046-const.patch", Size: 3922 bytes --]
* utsname used only once
* consts help gcc pack the object tighter
diff -upr udev-046/udev_lib.c udev-046-1/udev_lib.c
--- udev-046/udev_lib.c 2004-11-18 20:39:15.000000000 +0100
+++ udev-046-1/udev_lib.c 2004-11-19 10:33:23.885019143 +0100
@@ -65,12 +65,12 @@ void udev_set_values(struct udevice *ude
int kernel_release_satisfactory(int version, int patchlevel, int sublevel)
{
- static struct utsname uts;
static int kversion = 0;
static int kpatchlevel;
static int ksublevel;
if (kversion == 0) {
+ struct utsname uts;
if (uname(&uts) != 0)
return -1;
diff -upr udev-046/udev_sysfs.c udev-046-1/udev_sysfs.c
--- udev-046/udev_sysfs.c 2004-11-18 20:39:15.000000000 +0100
+++ udev-046-1/udev_sysfs.c 2004-11-19 10:42:08.480223052 +0100
@@ -35,9 +35,9 @@
#include "logging.h"
/* list of subsystem specific files, NULL if there is no file to wait for */
-static struct subsystem_file {
- char *subsystem;
- char *file;
+static const struct subsystem_file {
+ const char *subsystem;
+ const char *file;
} subsystem_files[] = {
{ .subsystem = "net", .file = "ifindex" },
{ .subsystem = "scsi_host", .file = "unique_id" },
@@ -56,7 +56,7 @@ static struct subsystem_file {
int subsystem_expect_no_dev(const char *subsystem)
{
- struct subsystem_file *file;
+ const struct subsystem_file *file;
for (file = subsystem_files; file->subsystem != NULL; file++)
if (strcmp(subsystem, file->subsystem) == 0)
@@ -66,9 +66,9 @@ int subsystem_expect_no_dev(const char *
}
/* get subsystem specific files, returns "dev" if no other found */
-static char *get_subsystem_specific_file(const char *subsystem)
+static const char *get_subsystem_specific_file(const char *subsystem)
{
- struct subsystem_file *file;
+ const struct subsystem_file *file;
/* look if we want to look for another file instead of "dev" */
for (file = subsystem_files; file->subsystem != NULL; file++)
@@ -123,9 +123,9 @@ static int class_device_expect_no_device
{
/* list of devices without a "device" symlink to the physical device
* if device is set to NULL, no devices in that subsystem has a link */
- static struct class_device {
- char *subsystem;
- char *device;
+ static const struct class_device {
+ const char *subsystem;
+ const char *device;
} class_device[] = {
{ .subsystem = "block", .device = "double" },
{ .subsystem = "block", .device = "nb" },
@@ -202,7 +202,7 @@ static int class_device_expect_no_device
{ .subsystem = "capi", .device = NULL },
{ NULL, NULL }
};
- struct class_device *classdevice;
+ const struct class_device *classdevice;
int len;
/* the kernel may tell us what to wait for */
@@ -240,13 +240,13 @@ static int class_device_expect_no_device
/* skip waiting for the bus of the devices device */
static int class_device_expect_no_bus(struct sysfs_class_device *class_dev)
{
- static char *devices_without_bus[] = {
+ static const char *devices_without_bus[] = {
"scsi_host",
"i2c-adapter",
"i2c-dev",
NULL
};
- char **device;
+ const char **device;
for (device = devices_without_bus; *device != NULL; device++) {
int len = strlen(*device);
@@ -262,9 +262,9 @@ static int class_device_expect_no_bus(st
int wait_for_devices_device(struct sysfs_device *devices_dev,
const char **error)
{
- static struct device_file {
- char *bus;
- char *file;
+ static const struct device_file {
+ const char *bus;
+ const char *file;
} device_files[] = {
{ .bus = "scsi", .file = "vendor" },
{ .bus = "usb", .file = "idVendor" },
@@ -280,7 +280,7 @@ int wait_for_devices_device(struct sysfs
{ .bus = "ieee1394", .file = "address" },
{ NULL, NULL }
};
- struct device_file *devicefile;
+ const struct device_file *devicefile;
int loop;
/* the kernel may tell us what to wait for */
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [ANNOUNCE] udev 046 release
2004-11-18 22:44 [ANNOUNCE] udev 046 release Greg KH
2004-11-19 9:58 ` Alex Riesen
2004-11-19 10:00 ` Alex Riesen
@ 2004-11-19 11:26 ` Mathieu Segaud
2004-11-19 14:42 ` Kay Sievers
2004-11-19 22:58 ` Greg KH
` (4 subsequent siblings)
7 siblings, 1 reply; 13+ messages in thread
From: Mathieu Segaud @ 2004-11-19 11:26 UTC (permalink / raw)
To: Greg KH; +Cc: linux-hotplug-devel, linux-kernel
Greg KH <greg@kroah.com> disait dernièrement que :
> I've released the 046 version of udev. It can be found at:
> kernel.org/pub/linux/utils/kernel/hotplug/udev-046.tar.gz
>
> (yes, there has also been releases for versions 040, 041, 042, 043, 044,
> and 045, I just forgot to announce them...)
>
> udev allows users to have a dynamic /dev and provides the ability to
> have persistent device names. It uses sysfs and /sbin/hotplug and runs
> entirely in userspace. It requires a 2.6 kernel with CONFIG_HOTPLUG
> enabled to run. Please see the udev FAQ for any questions about it:
> kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ
>
> For any udev vs devfs questions anyone might have, please see:
> kernel.org/pub/linux/utils/kernel/hotplug/udev_vs_devfs
>
> And there is a general udev web page at:
> http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
>
> This release has a completly new backend database. If you have had
> _any_ problems with udev lockups, 100% cpu utilitization, or issues with
> large machines having a zillion udev processes hanging around, please
> try this release.
>
> For those of you without any udev issues, I recommend the 045 release
> at:
> kernel.org/pub/linux/utils/kernel/hotplug/udev-045.tar.gz
>
> It's the same backend database, and has lots of bugfixes and tweaks
> since the 039 release.
>
> Major changes in this release from the 045 release:
> - no more tdb backend, we now have 1 file per sysfs entry in
> /dev/.udevdb that holds the information we need. Yes, this is
> a bit more memory than previously used, but we get the locking
> issues fixed for free as we rely on the kernel file locking
> rules to get it correct. Anyway, you should have /dev mounted
> on a tmpfs not ramfs so the memory is swapable.
> - new keywords to match on (DRIVER and SUBSYSTEM)
> - lots of good wait_for_sysfs fixes (we now take advantage of
> the new 2.6.10-rc2 kernel information and don't have to guess
> at what files we might have to wait for.)
> - loads of bugfixes and rule files tweaks.
seems like these changes broke something in rules applying to eth* devices.
the rules put and still working with udev 045 have no effect, now....
not so inconvenient now that I've got just one card in my box, but I guess
it could be a show-stopper for laptop users.
My rules which can be found at the end of /etc/udev/rules.d/50-udev.rules are:
KERNEL="eth*", SYSFS{address}="00:10:5a:49:36:d8", NAME="external"
KERNEL="eth*", SYSFS{address}="00:50:04:69:db:56", NAME="private"
KERNEL="eth*", SYSFS{address}="00:0c:6e:e4:2c:81", NAME="dmz"
Regards,
>
> Thanks to Kay Sievers for all the work he's been doing on udev lately,
> especially the database backend fixes. I really appreciate it.
>
> Also thanks to everyone who has send me patches for the recent releases,
> a full list of everyone, and their changes is below.
>
> udev development is done in a BitKeeper repository located at:
> bk://linuxusb.bkbits.net/udev
>
> Daily snapshots of udev from the BitKeeper tree can be found at:
> http://www.codemonkey.org.uk/projects/bitkeeper/udev/
> If anyone ever wants a tarball of the current bk tree, just email me.
>
> thanks,
>
> greg k-h
>
>
> Summary of changes from v045 to v046
> ======================
>
> Greg Kroah-Hartman:
> o make spotless for releases
>
> Kay Sievers:
> o Don't try to print major/minor for devices without a dev file
> o remove get_device_type and merge that into udev_set_values()
> o prevent udevd crash if DEVPATH is not set
> o add ippp and bcrypt to the exception lists of wait_for_sysfs
> o let klibc add the trailing newline to syslog conditionally
> o disable logging for udevstart
> o add NAME{ignore_remove} attribute
> o remove historical SYSFS_attr="value" format
> o don't wait for sysfs if the kernel(2.6.10-rc2) tells us what not to expect
> o change key names in udevinfo sysfs walk to match the kernel
> o support DRIVER as a rule key
> o support SUBSYSTEM as a rule key
> o rename udevdb* to udev_db*
> o Make dev.d/ handling a separate processing stage
> o make the udev object available to more processing stages
> o remove udev_lib dependency from udevsend, which makes it smaller
> o add ACTION to udev object to expose it to the whole process
> o make udevinfo's -r option also workimg for symlink queries
> o let udev act as udevstart if argv[1] = "udevstart"
> o improve udevinfo sysfs info walk
> o add sysfs info walk to udevinfo
> o pass the whole event environment to udevd
> o replace tdb database by simple lockless file database
>
>
> Summary of changes from v044 to v045
> ======================
>
> Martin Schlemmer:
> o Some updates for Gentoo's udev rules
>
>
> Summary of changes from v043 to v044
> ======================
>
> Greg Kroah-Hartman:
> o add cdsymlinks.sh support to gentoo rules file
> o fix gentoo legacy tty rule
> o remove 'sudo' usage from the Makefile
> o make udev-test.pl test for root permissions before running
>
> Kay Sievers:
> o reduce syslog noise of udevsend if multiple instances try to start udevd
> o add i2c-dev to the list of devices without a bus
>
>
> Summary of changes from v042 to v043
> ======================
>
> Greg Kroah-Hartman:
> o add test target to makefile
> o add dumb script to show all sysfs devices in the system
>
> Kay Sievers:
> o Shut up wait_for_sysfs class/net failure messages, as it's not possible to
> get that right for all net devices. Kernels later than 2.6.10-rc1 will
> handle that by carrying the neccessary information in the hotplug event.
> o wait() for specific pid to return from fork()
> o Don't use any syslog() in signal handler, cause it may deadlock
> o Add support for highpoint ataraid to volume_id to suppress label reading on raid set members.
> o Add a bunch of devices without "device" symlinks
> o Exit, if udevtest cannot open the device (segfault)
> o Patches from Harald Hoyer <harald@redhat.com>
> o Apply the default permissions even if we found a entry in the permissions
> file. Correct one test, as the default is applied correctly now and the
> mode will no longer be 0000.
> o add test for format chars in multiple symlinks to replace
> o Add net/vmnet and class/zaptel to the list of devices without physical device
>
>
> Summary of changes from v040 to v042
> ======================
>
> Greg Kroah-Hartman:
> o add inotify to the rules for gentoo
>
> Kay Sievers:
> o skip waiting for device if we get a bad event for class creation and not for a device underneath it
> o add net/pan and net/bnep handling
> o switch wait for bus_file to stat() instead of open() add net/tun device handling add ieee1394 device handling
> o Remove the last klibc specific line from the main udev code Move _KLIBC_HAS_ARCH_SIG_ATOMIC_T to the fixup file which is automatically included by the Makefile is we build with klibc
> o ignore *.rej files from failed patches
> o update to libsysfs 1.2.0 and add some stuff klib_fixup Now we have only the sysfs.h file different from the upstream version to map our dbg() macro.
> o improve klibc fixup integration
> o cleanup udevd/udevstart
> o expose sysfs functions for sharing it
>
>
> Summary of changes from v039 to v040
> ======================
>
> <jk:blackdown.de>:
> o wait_for_sysfs update for dm devices
>
> Greg Kroah-Hartman:
> o sparse cleanups on the tree
> o fix stupid cut-and-paste error for msr devices on gentoo boxes
> o add *~ to bk ignore list
> o delete udevruler.c as per Kay's request
> o fix up the wait_for_sysfs_test script a bit
>
> Kay Sievers:
> o fix debug in volume id / fix clashing global var name
> o volume_id fix
> o $local user
> o cleanup netif handling and netif-dev.d/ events
> o big cleanup of internal udev api
> o don't wait for dummy devices
> o close the syslog
> o Fix ppp net devices in wait_for_sysfs
> o Fix wait_for_sysfs messages (more debugging info)
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: InterSystems CACHE
> FREE OODBMS DOWNLOAD - A multidimensional database that combines
> robust object and relational technologies, making it a perfect match
> for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
> _______________________________________________
> Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
> Linux-hotplug-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
>
--
<riel> google rules
<google> rules: http://www.law.cornell.edu/rules/fre/overview.html
- Rik van Riel chatting with the bots on #kernelnewbies
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [ANNOUNCE] udev 046 release
2004-11-19 11:26 ` Mathieu Segaud
@ 2004-11-19 14:42 ` Kay Sievers
2004-11-19 14:49 ` Mathieu Segaud
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Kay Sievers @ 2004-11-19 14:42 UTC (permalink / raw)
To: Mathieu Segaud; +Cc: Greg KH, Hotplug Devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 655 bytes --]
On Fri, 2004-11-19 at 12:26 +0100, Mathieu Segaud wrote:
> seems like these changes broke something in rules applying to eth* devices.
> the rules put and still working with udev 045 have no effect, now....
> not so inconvenient now that I've got just one card in my box, but I guess
> it could be a show-stopper for laptop users.
>
> My rules which can be found at the end of /etc/udev/rules.d/50-udev.rules are:
>
> KERNEL="eth*", SYSFS{address}="00:10:5a:49:36:d8", NAME="external"
> KERNEL="eth*", SYSFS{address}="00:50:04:69:db:56", NAME="private"
> KERNEL="eth*", SYSFS{address}="00:0c:6e:e4:2c:81", NAME="dmz"
This should fix it.
Thanks,
Kay
[-- Attachment #2: udev-device-type-01.patch --]
[-- Type: text/x-patch, Size: 911 bytes --]
diff -Nru a/udev_lib.c b/udev_lib.c
--- a/udev_lib.c 2004-11-19 15:40:52 +01:00
+++ b/udev_lib.c 2004-11-19 15:40:52 +01:00
@@ -40,6 +40,7 @@
const char *subsystem, const char* action)
{
memset(udev, 0x00, sizeof(struct udevice));
+
if (devpath)
strfieldcpy(udev->devpath, devpath);
if (subsystem)
@@ -49,17 +50,13 @@
if (strcmp(udev->subsystem, "block") == 0)
udev->type = 'b';
-
- if (strcmp(udev->subsystem, "net") == 0)
+ else if (strcmp(udev->subsystem, "net") == 0)
udev->type = 'n';
-
- if (strncmp(udev->devpath, "/block/", 7) == 0)
+ else if (strncmp(udev->devpath, "/block/", 7) == 0)
udev->type = 'b';
-
- if (strncmp(udev->devpath, "/class/net/", 11) == 0)
+ else if (strncmp(udev->devpath, "/class/net/", 11) == 0)
udev->type = 'n';
-
- if (strncmp(udev->devpath, "/class/", 7) == 0)
+ else if (strncmp(udev->devpath, "/class/", 7) == 0)
udev->type = 'c';
}
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [ANNOUNCE] udev 046 release
2004-11-19 14:42 ` Kay Sievers
@ 2004-11-19 14:49 ` Mathieu Segaud
2004-11-19 15:45 ` Mathieu Segaud
2004-11-19 22:48 ` Greg KH
2 siblings, 0 replies; 13+ messages in thread
From: Mathieu Segaud @ 2004-11-19 14:49 UTC (permalink / raw)
To: Kay Sievers; +Cc: Greg KH, Hotplug Devel, linux-kernel
Kay Sievers <kay.sievers@vrfy.org> disait dernièrement que :
> On Fri, 2004-11-19 at 12:26 +0100, Mathieu Segaud wrote:
>> seems like these changes broke something in rules applying to eth* devices.
>> the rules put and still working with udev 045 have no effect, now....
>> not so inconvenient now that I've got just one card in my box, but I guess
>> it could be a show-stopper for laptop users.
>>
>> My rules which can be found at the end of /etc/udev/rules.d/50-udev.rules are:
>>
>> KERNEL="eth*", SYSFS{address}="00:10:5a:49:36:d8", NAME="external"
>> KERNEL="eth*", SYSFS{address}="00:50:04:69:db:56", NAME="private"
>> KERNEL="eth*", SYSFS{address}="00:0c:6e:e4:2c:81", NAME="dmz"
>
> This should fix it.
will report success as soon as I create the ebuild, test it and I submit it to
greg-kh.
btw, thanks for the quick answer.
--
... mindreading equipment is currently classified CIA property at
best (hello echelon!)
- Alan Cox on linux-kernel
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [ANNOUNCE] udev 046 release
2004-11-19 14:42 ` Kay Sievers
2004-11-19 14:49 ` Mathieu Segaud
@ 2004-11-19 15:45 ` Mathieu Segaud
2004-11-19 22:48 ` Greg KH
2 siblings, 0 replies; 13+ messages in thread
From: Mathieu Segaud @ 2004-11-19 15:45 UTC (permalink / raw)
To: Kay Sievers; +Cc: Greg KH, Hotplug Devel, linux-kernel
Kay Sievers <kay.sievers@vrfy.org> disait dernièrement que :
> On Fri, 2004-11-19 at 12:26 +0100, Mathieu Segaud wrote:
>> seems like these changes broke something in rules applying to eth* devices.
>> the rules put and still working with udev 045 have no effect, now....
>> not so inconvenient now that I've got just one card in my box, but I guess
>> it could be a show-stopper for laptop users.
>>
>> My rules which can be found at the end of /etc/udev/rules.d/50-udev.rules are:
>>
>> KERNEL="eth*", SYSFS{address}="00:10:5a:49:36:d8", NAME="external"
>> KERNEL="eth*", SYSFS{address}="00:50:04:69:db:56", NAME="private"
>> KERNEL="eth*", SYSFS{address}="00:0c:6e:e4:2c:81", NAME="dmz"
>
> This should fix it.
>
> Thanks,
> Kay
It works. Thanks a lot.
Mathieu Segaud
--
"The dead should not care about proper locking,
those are realms of the living..."
- Tigran Aivazian
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [ANNOUNCE] udev 046 release
2004-11-19 14:42 ` Kay Sievers
2004-11-19 14:49 ` Mathieu Segaud
2004-11-19 15:45 ` Mathieu Segaud
@ 2004-11-19 22:48 ` Greg KH
2 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2004-11-19 22:48 UTC (permalink / raw)
To: Kay Sievers; +Cc: Mathieu Segaud, Hotplug Devel, linux-kernel
On Fri, Nov 19, 2004 at 03:42:19PM +0100, Kay Sievers wrote:
> On Fri, 2004-11-19 at 12:26 +0100, Mathieu Segaud wrote:
> > seems like these changes broke something in rules applying to eth* devices.
> > the rules put and still working with udev 045 have no effect, now....
> > not so inconvenient now that I've got just one card in my box, but I guess
> > it could be a show-stopper for laptop users.
> >
> > My rules which can be found at the end of /etc/udev/rules.d/50-udev.rules are:
> >
> > KERNEL="eth*", SYSFS{address}="00:10:5a:49:36:d8", NAME="external"
> > KERNEL="eth*", SYSFS{address}="00:50:04:69:db:56", NAME="private"
> > KERNEL="eth*", SYSFS{address}="00:0c:6e:e4:2c:81", NAME="dmz"
>
> This should fix it.
Applied, thanks.
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ANNOUNCE] udev 046 release
2004-11-18 22:44 [ANNOUNCE] udev 046 release Greg KH
` (2 preceding siblings ...)
2004-11-19 11:26 ` Mathieu Segaud
@ 2004-11-19 22:58 ` Greg KH
2004-11-19 23:20 ` Paul Jackson
` (3 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2004-11-19 22:58 UTC (permalink / raw)
To: linux-hotplug
On Fri, Nov 19, 2004 at 11:00:40AM +0100, Alex Riesen wrote:
> On Fri, 19 Nov 2004 10:58:53 +0100, Alex Riesen <raa.lkml@gmail.com> wrote:
> > On Thu, 18 Nov 2004 14:44:12 -0800, Greg KH <greg@kroah.com> wrote:
> > > I've released the 046 version of udev. It can be found at:
> > > kernel.org/pub/linux/utils/kernel/hotplug/udev-046.tar.gz
> >
> > I just put const's at some places. It cut down data segments, but
> > increased code size.
> > Overall still smaller:
What version of gcc are you using that causes this to happen? And why
does it happen? Why does the compiler think it can pack these
structures better if they are const *?
> > -rwxr-xr-x 1 user users 50420 Nov 19 10:53 ../udev-046/udev
> > -rwxr-xr-x 1 user users 49556 Nov 19 10:53 udev
> > text data bss dec hex filename
> > 47245 968 22480 70693 11425 ../udev-046/udev
> > 48089 104 22064 70257 11271 udev
> >
> > Also, the instance of utsname in udev_lib.c is used only once.
>
> forgot the patch...
> * utsname used only once
> * consts help gcc pack the object tighter
>
> diff -upr udev-046/udev_lib.c udev-046-1/udev_lib.c
> --- udev-046/udev_lib.c 2004-11-18 20:39:15.000000000 +0100
> +++ udev-046-1/udev_lib.c 2004-11-19 10:33:23.885019143 +0100
> @@ -65,12 +65,12 @@ void udev_set_values(struct udevice *ude
>
> int kernel_release_satisfactory(int version, int patchlevel, int sublevel)
> {
> - static struct utsname uts;
> static int kversion = 0;
> static int kpatchlevel;
> static int ksublevel;
>
> if (kversion = 0) {
> + struct utsname uts;
> if (uname(&uts) != 0)
> return -1;
>
No, this should be fixed up to only call uname once. We do call it
multiple times from the same program, and that could be optimized.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [ANNOUNCE] udev 046 release
2004-11-18 22:44 [ANNOUNCE] udev 046 release Greg KH
` (3 preceding siblings ...)
2004-11-19 22:58 ` Greg KH
@ 2004-11-19 23:20 ` Paul Jackson
2004-11-19 23:47 ` Greg KH
` (2 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Paul Jackson @ 2004-11-19 23:20 UTC (permalink / raw)
To: linux-hotplug
Greg wrote:
> No, this should be fixed up to only call uname once. We do call it
> multiple times from the same program, and that could be optimized.
If doing such, be sure to ask yourself if the implementation needs to
be pthread safe.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373, 1.925.600.0401
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [ANNOUNCE] udev 046 release
2004-11-18 22:44 [ANNOUNCE] udev 046 release Greg KH
` (4 preceding siblings ...)
2004-11-19 23:20 ` Paul Jackson
@ 2004-11-19 23:47 ` Greg KH
2004-11-20 18:40 ` Alex Riesen
2004-11-22 19:52 ` Greg KH
7 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2004-11-19 23:47 UTC (permalink / raw)
To: linux-hotplug
On Fri, Nov 19, 2004 at 03:20:22PM -0800, Paul Jackson wrote:
> Greg wrote:
> > No, this should be fixed up to only call uname once. We do call it
> > multiple times from the same program, and that could be optimized.
>
> If doing such, be sure to ask yourself if the implementation needs to
> be pthread safe.
As udev isn't using pthreads, I don't think we need to worry about this
:)
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [ANNOUNCE] udev 046 release
2004-11-18 22:44 [ANNOUNCE] udev 046 release Greg KH
` (5 preceding siblings ...)
2004-11-19 23:47 ` Greg KH
@ 2004-11-20 18:40 ` Alex Riesen
2004-11-22 19:52 ` Greg KH
7 siblings, 0 replies; 13+ messages in thread
From: Alex Riesen @ 2004-11-20 18:40 UTC (permalink / raw)
To: linux-hotplug
On Fri, 19 Nov 2004 14:58:44 -0800, Greg KH <greg@kroah.com> wrote:
> > > > I've released the 046 version of udev. It can be found at:
> > > > kernel.org/pub/linux/utils/kernel/hotplug/udev-046.tar.gz
> > > I just put const's at some places. It cut down data segments, but
> > > increased code size.
> > > Overall still smaller:
>
> What version of gcc are you using that causes this to happen? And why
> does it happen? Why does the compiler think it can pack these
> structures better if they are const *?
I have 3.3.4, but I'm almost sure it shall happen with any compiler: no compiler
has given the knowledge that the structures will be never changed in any way.
So it can use the same storage for the equal string constants, for example.
With the knowledge it must assume you will change contents of the constants
sometime, and have to allocate the space for them separately. IOW, they are
not constants, just initializers. But, in fact, they are, hence the
suggestion to help
the compiler by declaring them const
> > > Also, the instance of utsname in udev_lib.c is used only once.
...
> > * utsname used only once
...
> > int kernel_release_satisfactory(int version, int patchlevel, int sublevel)
> > {
> > - static struct utsname uts;
> > static int kversion = 0;
> > static int kpatchlevel;
> > static int ksublevel;
> >
> > if (kversion = 0) {
> > + struct utsname uts;
> > if (uname(&uts) != 0)
> > return -1;
> No, this should be fixed up to only call uname once. We do call it
> multiple times from the same program, and that could be optimized.
No, you don't call it (uTSname) multiple times. kversion is static
(and even initialized to 0).
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [ANNOUNCE] udev 046 release
2004-11-18 22:44 [ANNOUNCE] udev 046 release Greg KH
` (6 preceding siblings ...)
2004-11-20 18:40 ` Alex Riesen
@ 2004-11-22 19:52 ` Greg KH
7 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2004-11-22 19:52 UTC (permalink / raw)
To: linux-hotplug
On Sat, Nov 20, 2004 at 07:40:58PM +0100, Alex Riesen wrote:
> On Fri, 19 Nov 2004 14:58:44 -0800, Greg KH <greg@kroah.com> wrote:
> > > > > I've released the 046 version of udev. It can be found at:
> > > > > kernel.org/pub/linux/utils/kernel/hotplug/udev-046.tar.gz
> > > > I just put const's at some places. It cut down data segments, but
> > > > increased code size.
> > > > Overall still smaller:
> >
> > What version of gcc are you using that causes this to happen? And why
> > does it happen? Why does the compiler think it can pack these
> > structures better if they are const *?
>
> I have 3.3.4, but I'm almost sure it shall happen with any compiler: no compiler
> has given the knowledge that the structures will be never changed in any way.
> So it can use the same storage for the equal string constants, for example.
> With the knowledge it must assume you will change contents of the constants
> sometime, and have to allocate the space for them separately. IOW, they are
> not constants, just initializers. But, in fact, they are, hence the
> suggestion to help
> the compiler by declaring them const
Ok, Kay has commited your changes to the udev tree, thanks.
greg k-h
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 13+ messages in thread