summaryrefslogtreecommitdiff
path: root/libudev
AgeCommit message (Collapse)Author
2010-03-25libudev: update documentationKay Sievers
2010-03-18add LGPL COPYING to libudev and GUdevKay Sievers
2010-03-17libudev: add udev_device_new_from_environment()Kay Sievers
2010-03-11libudev: docs - .gitignore backup filesKay Sievers
2010-03-10libbudev-private: rename udev_list_entry_get_flag()Kay Sievers
2010-03-02Increase UTIL_LINE_SIZE from 2048 to 16384David Zeuthen
Recent udisks versions, for LVM2 integration, ships with probers that produce very long lines such as UDISKS_LVM2_PV_VG_PV_LIST= uuid=98lyZl-Ya7U-p26Z-Ia7b-xf8u-xZqP-jc4njb;size=2000397795328;allocated_size=2000397795328 uuid=iFs0cM-sxCF-ceQK-hZl1-kbwo-ZTjq-gSewQR;size=2000397795328;allocated_size=2000397795328 [...] e.g. roughly 100 bytes per LVM2 physical volume for each LVM2 PV encountered. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-03-02Use UTIL_LINE_SIZE, not UTIL_PATH_SIZE to truncate propertiesDavid Zeuthen
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-03-02Decrease buffer size when advancing past NUL byteDavid Zeuthen
Otherwise we'll overflow the buffer if space is tight. Also add a comment explaining this. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-02-17libudev: export udev_monitor_set_receive_buffer_size()Scott James Remnant
This function is useful for anything that's likely to be running alongside udevd during cold-plugging, and is using libudev to receive the events. It makes little sense for it to be private, or to require other software to relearn how to adjust the buffer size. Signed-off-by: Scott James Remnant <scott@ubuntu.com>
2010-01-13libudev: device - create db file atomicallyKay Sievers
We need to prevent that libudev parses half-written database files. Also for "change" events, we need to make sure, that database files always exist to be read by libudev, and that they are not first deleted before they are re-created.
2010-01-07work around gtk-doc which breaks distcheckKay Sievers
2010-01-07libudev: doc - add symbols to sections.txtKay Sievers
2009-12-30libudev: enumerate - fix move_later logicThomas de Grenier de Latour
The move_later_prefix variable was reset to zero on each loop iteration, and thus the move_later entry (if any) was not added right after changing to another syspath prefix, but rather after exiting the enumeration loop.
2009-12-25remove UDEV_RUN environment variableKay Sievers
It handles only RUN but not IMPORT and PROGRAM. There is no sane way to suppress program execution. Most important programs run with IMPORT these days. Also events can no longer suppressed with the libudev netlink messages, so UDEV_RUN does nothing useful and is just inconsistent.
2009-12-25fix typo in log message priority handlingKay Sievers
2009-12-24remove remaining support for CONFIG_SYSFS_DEPRECATEDKay Sievers
2009-12-21Speed up udev_enumerate_scan_*Martin Pitt
Check property match earlier, to avoid lots of readlink() and stat() calls when we check property matches.
2009-12-15remove remaining support for CONFIG_SYSFS_DEPRECATEDKay Sievers
2009-12-15libudev: wrap in extern "C" block for C++Daniel Elstner
When libudev.h is included from C++ code, wrap the declarations in an extern "C" { ... } block. This tells the C++ compiler that symbols are exported with C linkage and no name-mangling.
2009-12-08util_unlink_secure(): chmod() before chown()Kay Sievers
2009-12-03libudev: doc - use #NULLKay Sievers
2009-12-03udev_device_get_parent_with_subsystem_devtype(): Clarify documentationMartin Pitt
devtype can be NULL, in which case it is ignored for matching.
2009-10-30udevd: queue-export - remove retry loopAlan Jenkins
These retry loops are required where create_path() could race with delete_path(). But only the main udevd process writes to the queue, so no races will happen here. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-10-30use CLOEXEC flags instead of fcntl()Kay Sievers
2009-10-28break loops if util_create_path() returns errorKay Sievers
Dangling symlinks in path components return -ENOENT. Do not retry to create the file in a loop in such case.
2009-10-20libudev: allow to store negative values in the udev databasePeter Rajnoha
2009-09-22util_run_program: *really* restore signal mask before executing event RUN ↵Scott James Remnant
commands The previous patch was almost, but not quite, correct. Rather than restoring the signal mask it actually tried to make an even more restrictive signal mask (had SIGALRM been blocked when udevd started, anyway). Fix it harder. Signed-off-by: Scott James Remnant <scott@ubuntu.com>
2009-09-10put util_create_path() and file creastion in a retry loopKay Sievers
On 8/29/09, Florian Zumbiehl <florz@florz.de> wrote: > Could it happen that > util_create_path() and util_delete_path() > do run in parallel for > the same directory? After all, util_create_path() > does handle > the case where creation of the directory happens in parallel > to it running, so it doesn't seem all that unlikely to me ...
2009-09-10reorder create_path() and node/link creation to be called in a direct sequenceKay Sievers
2009-09-09simplify "symlink name stack"Kay Sievers
With well defined and kernel-supplied node names, we no longer need to support a possible stack of conflicting symlinks and node names. Only symlinks with identical names can be claimed by multiple devices. This shrinks the former /dev/.udev/names/ significantly. Also the /dev/{block,char}/MAJ:MIN" links are excluded from the name stack - they are unique and can not conflict.
2009-09-08fix randonm findings from llvm-clang-analyzerKay Sievers
Thanks to Lennart for the log file!
2009-09-08util_run_program(): fix possible buffer overflow #2Florian Zumbiehl
I'm not sure how likely it is for UTIL_PATH_SIZE to have an odd value (maybe it has right now? :-), but I guess making this universally correct doesn't hurt ...
2009-09-07util_run_program(): skip multiple spaces in argv creationKay Sievers
2009-09-07util_run_program: restore signal mask before executing event RUN commandsJeremy Kerr
External programs triggered by events (via RUN=) will inherit udev's signal mask, which is set to block all but SIGALRM. For most utilities, this is OK, but if we start daemons from RUN=, we run into trouble (especially as SIGCHLD is blocked). This change saves the original sigmask when udev starts, and restores it just before we exec() the external command. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2009-09-07udev_queue_get_seqnum_sequence_is_finished(): fix possible file handle leakFlorian Zumbiehl
2009-09-01udev_util_encode_string(): fix possible buffer overflowFlorian Zumbiehl
2009-09-01libudev-util.c: get_sys_link() - return error for empty link targetKay Sievers
2009-09-01util_resolve_sys_link(): fix possible buffer overflowFlorian Zumbiehl
2009-08-30util_create_path(): fix possible out of bounds array accessFlorian Zumbiehl
2009-08-29util_delete_path(): handle multiple leading slashesFlorian Zumbiehl
2009-08-29util_create_path(): fix errno usageKay Sievers
Based on a patch from: Florian Zumbiehl <florz@florz.de>
2009-08-29util_lookup_group(): fix memory leak if realloc() failsFlorian Zumbiehl
2009-08-29util_delete_path(): use util_strscpy()Florian Zumbiehl
2009-08-29util_unlink_secure(): chmod() before chown()Kay Sievers
Suggested by Florian Zumbiehl <florz@florz.de>.
2009-08-25assign errno for getgrnam_r()/getpwnam_r()Kay Sievers
On Mon, Aug 24, 2009 at 19:50, Lennart Poettering<lennart@poettering.net> wrote: > One little comment here: on POSIX getrnam_r() doesn't touch > errno. Instead it returns the error value as return value.
2009-08-19change database file namesKay Sievers
With very deeply nested devices, We can not use a single file name to carry an entire DEVPATH. Use <subsystem>:<sysname> as the database filename, which should also simplify the handling of devices moving around, as these values will not change but still be unique. For the name stack we use the <maj>:<min> now as the filename. > On Tue, Aug 18, 2009 at 09:59:56AM -0400, Ric Wheeler wrote: > The first is that udev grumbles during boot about "file name too long" > like the following: > > Aug 17 06:49:58 megadeth udevd-event[20447]: unable to create db file > '/dev/.udev/db/\x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2f0000:17:00.0\x2f0000:18:0a.0\x2f0000:1f:00.0\x2fhost11\x2fport-11:0\x2fexpander-11:0\x2fport-11:0:0\x2fexpander-11:1\x2fport-11:1:0\x2fexpander-11:2\x2fport-11:2:17\x2fexpander-11:3\x2fport-11:3:1\x2fend_device-11:3:1\x2fbsg\x2fend_device-11:3:1': > File name too long
2009-08-18don't compare a non-existing function with NULLDaniel Mierswa
Obviously someone forgot something here or didn't use -ansi. Either way, index is nowhere declared so I assume the current behaviour is to check against the index() function coming from somewhere in the POSIX headers. The comparison doesn't make sense then. Signed-off-by: Daniel Mierswa <impulze@impulze.org>
2009-08-08fix spellingAlan Jenkins
Fix spelling in docbook comments, code comments, and a local variable name. Thanks to "ispell -h" for docbook HTML and "scspell" for source code. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-08-07Fix building of documentation when doing out-of-source builds.Diego Elio 'Flameeyes' Pettenò
Since gtk-mkhtml is executed in a sub-directory of the build directory, and make does not know of that, the $(buildir) variable will still be "." and the $(srcdir) will not properly be found. For this reason, use the absolute variants for the two functions, which won't be changing.
2009-08-07Merge libudev, udev, and the unconditional extras in a single Makefile.am.Diego Elio 'Flameeyes' Pettenò
Instead of using multiple recursive Makefile.am files, use a single Makefile.am that sets and builds all the basic suite of libraries and binaries for udev. This reduces the number of files in the source tree, and also reduces drastically the build time when using parallel-make. With this setup, all the compile steps will be executed in parallel, and just the linking stage will be (partially) serialised on the libraries creation.