IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
On Tuesday 25 November 2003 00:12, Chris Larson wrote:
> udev fails to compile here unless I'm doing a KLIBC build. The reason
> appears to be that the normal limits.h in the gcc inc dir doesn't pull
> in linux/limits.h, whereas the limits.h out in the klibc include dirs
> does. I'd think it'd be best to add a #include <linux/limits.h> to
> udev.h directly, since it uses PATH_MAX.
No, don't include kernel headers directly if you can avoid it.
The problem you are referring to seems to be with old tool chains,
I have the same symptom with my s390 gcc-2.95/glibc-2.1.3.
Including <sys/param.h> instead of <limits.h> seems to fix it.
here is a clean-up patch :
* removes sg_err.[ch] deps
* makes sure the core code play nice with klibc
* port the sysfs calls to dlist helpers
* links against udev's sysfs (need libsysfs.a & dlist.a)
* finally define DM_TARGET as "multipath" as Joe posted the code today
(not tested yet)
* push version forward (do you want it in sync with udev version?)
libdevmapper doesn't play well with klibc, so I wasn't able to produce a
static binary yet. Help needed here ... as I don't want to fall back to
merge libdevmapper code in the core.
It compiles here and doesn't segfault.
There seems to be a
mismatch in udev and in libsysfs as to what to expect if the mnt point
has a slash on the end or not. If I use the included patch, it breaks
something in udev. If I patch sysfs_get_mnt_path I break udev as well
because what you're expecting. I need to sit down and go through
the library and creaate a rule as to trailing slashes. Adding the env
brought this to light.
Here's the patch to up the library to the sysfsutils-0_3_0 level. The
following changes:
1) adds class name to sysfs_class_device structure
2) adds bus to sysfs_device
3) gets rid of code that made assumptions as to bus addresses being
unique across buses, which isn't the case.
I still owe you:
1) change getpagesize->sysconf. This is in the CVS tree and part of other
changes we're currently testing. Patch will follow.
2) you need a function to get a sysfs_class_device's parent. We hadn't
considered class devices to have parents, the one example of a multilevel
is the block class. We will add this function and send the patch to you.
On Monday 24 November 2003 01:29, Greg KH wrote:
> I think with the ability to capture the output of the CALLOUT rule,
> combined with the ability to put format modifiers in the CALLOUT program
> string, we now have everything in place to emulate the existing devfs
> naming scheme. Anyone want to verify this or not?
I would prefer to have the ability of creating partition nodes in devfs
style built-in to udev. Devfs used to call the whole disk e.g.
"/dev/dasd/0123/disk" and the partitions "/dev/dasd/0123/part[1-3]".
This can obviously be done with a CALLOUT rule, but its common enough
to make it a format modifier. AFAIK, this scheme has been used for
ide, scsi and dasd disks, which is about 99% of all disks ever connected
to Linux.
udev kept on segfaulting when it was in use, and not having the time
(and building it with DEBUG=true showing nothing), I have not tracked it
until tonight. Seems like I made a type-o, and forgotten the ':'
between one line's group and permission parameters. Attached patch
should stop the segfault, and warn at that at least.
04-udev.8-tweak-numeric-id-text.diff
o change "return value" to "returned string"
o add textual owner/group example for udev.permissions
o mention klibc compile as special case for udev.permissions
o remove duplicated numeric owner clause
here is a patch for inserting the callout output into NAME=.
ID= supports the usual wildcard to compare with the output.
I've moved all wildcard matching to a function cause this was the third occurrence.
Also attached is the last whitespace cleanup and debug text corrections.
The callout patch depends on the whitespace patch.
CALLOUT, BUS="usb", PROGRAM="/bin/echo -n return", ID="ret*", NAME="webcam-%c-"
results in:
Nov 21 17:33:51 pim udev[20399]: get_major_minor: found major = 81, minor = 0
Nov 21 17:33:51 pim udev[20399]: exec_callout: callout to '/bin/echo -n return'
Nov 21 17:33:51 pim udev[20399]: exec_callout: callout returned 'return'
Nov 21 17:33:51 pim udev[20399]: get_attr: substitute callout output 'return'
Nov 21 17:33:51 pim udev[20399]: udev_add_device: name = webcam-return-
Nov 21 17:33:51 pim udev[20399]: create_node: mknod(/udev/webcam-return-, 020660, 81, 0)
On Wed, Nov 19, Greg KH wrote:
> > I did 'make KLIBC=true' in the current bk tree.
>
> try 'make -f Makefile.klibc' in the current tree. For some reason I
> couldn't figure out how to have Makefile work for both KLIBC=true and
> KLIBC=false. But I didn't try too hard :)
I dont understand that.
please do rm -f Makefile.klibc; apply this patch and tell me what fails.
works for me.
here is argument support for CALLOUT exec:
CALLOUT, PROGRAM="/bin/echo -n xxx", BUS="usb", ID="xxx", NAME="webcam%n"
results in:
Nov 20 02:35:20 pim udev[30422]: get_major_minor: found major = 81, minor = 0
Nov 20 02:35:20 pim udev[30422]: exec_callout: callout to /bin/echo -n xxx
Nov 20 02:35:20 pim udev[30422]: exec_callout: callout returned 'xxx'
Nov 20 02:35:20 pim udev[30422]: get_attr: kernel number appended: 0
The feature is really nice, but the maximum argument count is hard coded to 8.
I want to bring the CALLOUT field ordering in line with the other
methods, cause the current parsing relies on the ordering it's good
to have it like the others. The BUS= is now the first expected field.
Also made the last two remaining field names to uppercase and the man page
callout example is updated.
here is mainly a whitespace cleanup for namedev.c. I changed the
dbg_parse() output a bit for better readability:
current:
Nov 19 19:00:59 pim udev[25582]: do_number: NUMBER path='/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.1'
Nov 19 19:00:59 pim udev[25582]: do_number: NUMBER temp='/2-1.1' id='00:07.1'
Nov 19 19:00:59 pim udev[25582]: do_number: NUMBER temp='/2-1' id='00:07.1'
Nov 19 19:00:59 pim udev[25582]: do_number: NUMBER path='/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.1'
Nov 19 19:00:59 pim udev[25582]: do_number: NUMBER temp='/2-1.1' id='00:0b.0'
Nov 19 19:00:59 pim udev[25582]: do_number: NUMBER temp='/2-1' id='00:0b.0'
Nov 19 19:00:59 pim udev[25582]: do_number: NUMBER path='/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.1'
Nov 19 19:00:59 pim udev[25582]: do_number: NUMBER temp='/2-1.1' id='2-1.1'
Nov 19 19:00:59 pim udev[25582]: do_number: device id '2-1.1' becomes 'webcam%n' - owner='', group ='', mode=0
becomes:
Nov 19 19:23:40 pim udev[26091]: do_number: search '00:07.1' in '/2-1.1', path='/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.1'
Nov 19 19:23:40 pim udev[26091]: do_number: search '00:07.1' in '/2-1', path='/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1'
Nov 19 19:23:40 pim udev[26091]: do_number: search '00:0b.0' in '/2-1.1', path='/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.1'
Nov 19 19:23:40 pim udev[26091]: do_number: search '00:0b.0' in '/2-1', path='/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1'
Nov 19 19:23:40 pim udev[26091]: do_number: search '2-1.1' in '/2-1.1', path='/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.1'
Nov 19 19:23:40 pim udev[26091]: do_number: found id '2-1.1', 'video0' becomes 'webcam%n' - owner='', group ='', mode=0