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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Here's an update for the writing udev rules document.
- Minor corrections/clarifications
- Added info about using NAME{all_partitions}
- Added more info about udevinfo, simplifying the rule-writing process
You can ignore the diff I sent you yesterday - according to the 20040415 bk
snapshot on codemonkey.org, you haven't applied it yet. This patch
incorporates that update, and some other changes I just made.
Thanks to Yin, Hu <hu.yin@intel.com>, who made a nice perl script to test the
expected behavior of the udevd sequence number handling. The test sends
different SEQNUM sequences to udevd, while analyzing the reordering and timeout
handling of udevd.
On Sun, Apr 11, 2004 at 03:51:07AM +0200, Kay Sievers wrote:
> Here we change extras/dbus/* to
> o install the binary in /etc/dev.d
> o append .dev to the binary
> o add David's copyright
> o add the listener script to watch the sent dbus messages
> o removed the undefined udev_log variable
> o switch printf() to dbg()
Here we install the binary in /usr/sbin/ and symlink it to
/etc/dev.d/ with the .dev suffix.
It seems that the transition from DEVNODE to DEVNAME wasn't done
everywhere. This broke udev_dbus for me.
Attached patch does the transition in the places it wasn't done yet.
Based on a patch from Olaf Hering we remove the node now only if the
requested dev_t is different from the already existing node, so any
run of udevstart should preserve the inode number of the node file.
syslog while the right node is already there:
creating device node '/udev/hda'
make_node: preserve file '/udev/hda', cause it has correct dev_t
make_node: chmod(/udev/hda, 060600)
syslog for wrong file already there:
creating device node '/udev/hda'
make_node: already present file '/udev/hda' unlinked
make_node: chmod(/udev/hda, 060600)
syslog for directory with same name already there:
creating device node '/udev/hda'
make_node: unlink(/udev/hda) failed with error '21'
Here we change the DEVPATH for netdev's in the environment of the dev.d/
scripts to the name the device is renamed to. The original name doesn't
exist in the kernel after rename.
Here is a patch to change the netdev handling in the database and for
the dev.d/ calls. I applies on top of the udevd.patch, cause klibc has
no sysinfo().
o netdev's are also put into our database now. I want this for the
udevruler gui to get a list of all handled devices.
All devices in the db are stamped with the system uptime value at
the creation time. 'udevinfo -d' prints it.
o the DEVPATH value is the key for udevdb, but if we rename
a netdev, the name is replaced in the kernel, so we add
the changed name to the db to match with the remove event.
NOTE: The dev.d/ scripts still get the original name from the
hotplug call. Should we replace DEVPATH with the new name too?
o We now only add a device to the db, if we have successfully created
the main node or successfully renamed a netdev. This is the main part
of the patch, cause I needed to clean the retval passing trough all
the functions used for node creation.
o DEVNODE sounds a bit ugly for netdev's so I exported DEVNAME too.
Can we change the name?
o I've added a UDEV_NO_DEVD to possibly skip the script execution
and used it in udev-test.pl.
udevstart is the same horror now, if you have scripts with logging
statements in dev.d/ it takes minutes to finish, can we skip the
scripts here too?
o The get_device_type() function is changed to be more strict, cause
'udevinfo -a -p /block/' gets a class device for it and tries to
print the major/minor values.
o bugfix, the RESULT value has now a working newline removal and a test
for this case.
here is a patch on top of your nice improvements.
I fixed the whitespace and it hopefully fixes the stupid timestamp bug in
udevd. Some stupid OS sets the hwclock to localtime and linux changes it
to UTC while starting. If any events are pending they may be delayed by
the users time distance from UTC :) So we use the uptime seconds now.
This patch covers a number of areas:
1) sysfs.h is fixed up to use the common dbg() macro. This fixes the
case where DEBUG is defined but USE_LOG isn't.
2) udevstart.c is modified to include the proper headers, rather than
getting them indirectly which can break depending on Makefile flags
3) udevd.c gets some major changes:
a) I added a pipe from the signal handler. This fixes the race
conditions that I mentioned earlier. Basically, the point of the pipe
is to force the select() call to return immediately if a signal handler
fired before we actually started the select() call. This then lets us
run the appropriate code based on flags set in the signal handler proper.
b) I added a number of flags to coalesce calls to common routines. This
should make things slightly more efficient.
c) since most calls will tend to come in with a sequence number larger
than what has been received, I switched msg_queue_insert() to scan the
msg_list backwards to improve performance.
filename="udevd.diff"
On Fri, Mar 26, 2004 at 06:36:32PM +0500, Ananth N Mavinakayanahalli wrote:
> On Fri, Mar 26, 2004 at 11:24:39AM +0100, Kay Sievers wrote:
> > On Fri, Mar 26, 2004 at 11:21:29AM +0500, Ananth N Mavinakayanahalli wrote:
> > > On Fri, Mar 26, 2004 at 04:47:35AM +0100, Kay Sievers wrote:
> > > > On Fri, Mar 26, 2004 at 01:26:46AM +0100, Carl-Daniel Hailfinger wrote:
> > > > > Greg KH wrote:
> > > > > > On Tue, Mar 23, 2004 at 01:51:01PM -0800, Daniel Stekloff wrote:
> > > >
> > > > No, it breaks the net device handling. I think we should change
> > > > libsysfs instead, not to return a class device for '/block', if
> > > > we want to fix it.
> > >
> > > /sys/block is considered a sysfs "class" and not a class_device. So,
> > > going by udevinfo's help, -p expects path to a class_device and _not_
> > > a class itself and hence option /sys/block with -p is not a valid query.
> > >
> > > Kay?
> >
> > Yes, it's invalid, but we shouldn't print major minor for a invalid
> > path. sysfs_open_class_device_path("/block") returns a device. If this is
> > the right behavior for libsysfs, I will change the get_device_type("/block")
> > not to return a 'b'-type.
>
> Libsysfs validates the path given to it for opening a class_device to be
> a valid directory; it does not however validate if the path is a valid
> class_device path. So, in the case of udevinfo, a 'b' type should not
> be returned if the path is just /sys/block or /sys/block/
This may prevent it.
Hi all, Greg,
libsysfs/dlist.c: _dlist_mark_move()
is missing checks for empty lists and may (and indeed, does) crash when=20
called with empty dlists.