Age | Commit message (Collapse) | Author |
|
Here I change the callout fork logic.
The current cersion is unable to read a pipe which is not flushed at once,
Now we read until it's closed.
The maximum argument count is calculated by the strlen now. We have 100
chars for our result buffer so we can't have more than 50 parameters.
So it's much more clear what will happen now and not some magic boundary
where we use shell behind it.
Parameter can be combined to one by using apostrophes.
this on works now:
BUS="scsi", PROGRAM="/bin/sh -c 'echo foo3 foo4 foo5 foo6 foo7 foo8 foo9 | sed s/foo9/bar9/'", KERNEL="sda3", NAME="%c{7}"
Two new test are also added.
|
|
|
|
|
|
This allows to set the permissions along with the rule.
This is not a general replacement for the permissions config, but it
may be easier sometimes for the user to specify the permissions along
with the rule, cause the permissions config file wants the final node
name to match, which seems sometimes a bit difficult to guess, if
format % chars are used in the NAME field.
Any value not given in the rule is still be read from the permissions
file or set to the default. This one will also work:
BUS="usb", KERNEL="video*", NAME="my-%k", OWNER="$local"
A few words to man page are also added and add_perm_dev() is moved into
namedev_parse.c where it belongs to.
|
|
Added this line to have xterms provide a prompt.
|
|
Thanks to Christian Gierke, he sent me a beauty patch for our man pages.
Some typos are fixed and a few word are clarified.
|
|
Here we mention the "symlink only - add it to another rule" feature
to the man page. Andrey, does this describe what you have implemented :)
|
|
Hey, I wrote the strn*() macros just 10 days ago and yesterday this trap
caught me with the %c{x} bug.
The names are misleading cause we all expect that the from field is limited by
the size argument, but we actually limit the overall size of the destination
string to prevent a overflow.
Here we rename all strn*() macros to str*max(). That should be
more self-explanatory.
|
|
udevstart_no_retval: currently udevstart will always return rc=22
because of the error handling code. I completely removed it because it
is not used, and returning a generic error to the init script is not
much useful anyway.
|
|
Here's a patch that puts the udev.rules and udev.permissions files in the
docs dir. This should help people out who install with just the rpm.
|
|
Hey, it may never happen, that one wants to distinguish attributes by
trailing spaces, but we should not lose the control over it, just for
being lazy :)
Here we remove the trailing spaces of the sysfs attribute only if the
configured value to match doesn't have any trailing spaces by itself.
So if you put a attribute in a rule with spaces at the end, the sysfs
attribute _must_ match exactly.
Is that cool for everyone?
As usual, 2 tests are added for it with a artificial sysfs file and
a few words to the man page.
|
|
Make udevinfo attribute printing note so clear,
that's nearly impossible to misunderstand it in the future.
|
|
On Wed, Mar 03, 2004 at 04:56:34PM -0800, Greg KH wrote:
> On Wed, Mar 03, 2004 at 03:57:04PM -0800, Patrick Mansfield wrote:
> >
> > Here is a patch for some new tests.
>
> Applied, thanks.
Here is a small improvement, which looks much better.
Hey Pat, thanks a lot for finding the recent bug, hope this one will
not break it again :)
|
|
remove extraneous word.
|
|
Here I try to make the style a bit more consistant in the different
files, so that new patches just copy the 'right' one :)
Some "magic" numbers are replaced and udevtest.c is catched up with udev.
|
|
Here is a patch for some new tests.
|
|
On Wed, Mar 03, 2004 at 02:43:34PM -0800, Patrick Mansfield wrote:
> Here is a fix and a new test for the problem Atul hit, where if we have a
> NAME based on a result of the form:
>
> NAME="foo-%c{7}"
>
> udev truncates the name. Without any prefix (the foo- in this example),
> the rule was working OK.
Here is a fix for the fix :)
Sorry, I broke it yesterday.
|
|
|
|
|
|
Here I try to cleanup our various multifield iteration over the strings.
Inspired by our nice list.h we now have a macro to iterate over the string
and process the parts of it:
It makes the code more readable and we don't change the string while we
process it like the former strsep() does.
Example:
foreach_strpart(dev->symlink, " ", pos, len) {
if (strncmp(&dev->symlink[pos], find_name, len) != 0)
continue;
...
}
For the callout part selector %c{2} we separate now not only by space but
also newline and return characters, cause some programs may give multiline
values back. A possible RESULT match must contain wildcards for these
characters.
Also a bug in the recent udevinfo symlink query feature is fixed.
|
|
|
|
|
|
Here we rename the former tiny $(HELPER) to $(INFO)
cause it's no longer only a helper :)
And install it in /usr/bin instead of /sbin cause any user
may want to call it and we don't need it on startup.
|
|
Is this something for the blacklist?
/sys/class/pcmcia_socket/
|-- pcmcia_socket0
| |-- device -> ../../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0
| `-- driver -> ../../../bus/pci/drivers/yenta_cardbus
`-- pcmcia_socket1
|-- device -> ../../../devices/pci0000:00/0000:00:1e.0/0000:02:00.1
`-- driver -> ../../../bus/pci/drivers/yenta_cardbus
|
|
|
|
grrr...robert...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I just wanted to terminate the snprintf() strings, cause I can see a
overflow with closed eyes after all the audit :)
But then I changed a bit more to bring it in line with the style of the
other files. I replaced the exec_udev() function with the one from
udevd, cause we don't need to read the stdout from udev.
Please have a look if it still works for you too and not
only for usernames with 3 characters :)
|
|
On Mon, 2004-03-01 at 20:08, Robert Love wrote:
> Ack, I did not even see that! Thanks.
>
> Let's rip that out, and always use the new built-in logic to determine
> what initscript to install.
Hm, looks like we do not need the %{lsb} and USE_LSB logic at all,
anymore.
Here is the patch, updated, removing both completely.
|
|
While moving the local user logic in it's own function I missed to
change the "secure" string macro. We copy only the first 3 bytes
of the username. Guess why I didn't notice it :)
|
|
to want to share :(
|
|
|
|
Taken from udev-018-2.src.rpm from Fedora Devel.
|
|
<harald@redhat.com>
This can be used instead of the start_udev script for systems
that do not have a shell, or some other problem...
|
|
Fix for recent unlink patch.
|
|
I promise, that I will not take every item you put in the TODO list :)
|
|
It seems that the long attribute list can confuse the user.
Se here we print a few words on top the attributes.
|
|
Thanks to Olaf Hering <olh@suse.de> for this patch. It's possible now to
feed the -n option of udevinfo with a symlink.
I've also added a 'all' attribute, but no more text, it's all in the
included man page :)
|
|
Based on the patch in the Gentoo repo.
|
|
The endptr is never NULL, so here we hopefully do the right thing.
|
|
On Mon, 2004-03-01 at 17:44, Greg KH wrote:
> Hm, that should be Robert's job actually, he should do something for
> real... :)
Hey, I wrote the nifty local user detection snippet - but, I owe Kay, so
here is an updated man page.
|
|
|
|
|
|
Here is a small change to the udev man page:
- clarify the use of the NAME{all_partitions} syntax
and add a example to udev.rules.example
- mention the empty NAME field to ignore the device
- prepare a SYMLINK field for the addition of Andrey's
"multiple symlinks" documentation :)
|
|
no_error_on_enoent: do not exit with an error and delete all files
when a device or directory does not exist.
|