summaryrefslogtreecommitdiffstats
path: root/src/udev/cdrom_id (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* tree-wide: group include of libudev.h with sd-*Thomas Hindoe Paaboel Andersen2015-11-171-1/+2
|
* tree-wide: sort includesThomas Hindoe Paaboel Andersen2015-11-161-2/+1
| | | | Sort the includes accoding to the new coding style.
* util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering2015-10-241-11/+12
| | | | | | | | | | | | | | string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
* tree-wide: replace while(1) by for(;;) everywhereLennart Poettering2015-09-091-1/+1
| | | | Another Coccinelle script.
* tree-wide: update empty-if coccinelle script to cover empty-while and moreLennart Poettering2015-09-091-2/+1
| | | | Let's also clean up single-line while and for blocks.
* tree-wide: do not return error codes as boolThomas Hindoe Paaboel Andersen2015-08-061-2/+2
|
* shared: add random-util.[ch]Ronny Chevalier2015-04-111-0/+1
|
* cdrom_id: unroll and simplify data check loopHarald Hoyer2015-03-271-13/+14
| | | | | | | | | | | also removes this warning: src/udev/cdrom_id/cdrom_id.c: In function ‘cd_media_info.isra.13’: src/udev/cdrom_id/cdrom_id.c:612:12: warning: assuming signed overflow does not occur when assuming that (X + c) >= X is always true [-Wstrict-overflow] static int cd_media_info(struct udev *udev, int fd) ^
* udev: improve help/usage for some more programsRobert Milasan2015-01-011-5/+5
|
* use correct format typesThomas Hindoe Paaboel Andersen2014-12-111-5/+5
|
* udev: switch to systemd logging functionsKay Sievers2014-11-131-11/+0
|
* util: unify how we see srand()Lennart Poettering2014-10-301-1/+1
|
* cdrom_id: do not attempt to read past end of bufferZbigniew Jędrzejewski-Szmek2014-10-281-1/+1
| | | | CID #1238437
* build-sys: add missing makefile symlinksLennart Poettering2014-08-111-0/+1
|
* udev: never bypass our own logging framework and call vsyslog() directly ↵Lennart Poettering2014-08-111-10/+6
| | | | from udev tools
* cdrom_id: use the old MMC fallbackLukas Nykryn2014-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1038015 The problem seems to be that the your virtual DVD is emulating a really old DVD device, and doing it kind of strangely. > dracut:# /lib/udev/cdrom_id --debug /dev/sr0 > probing: '/dev/sr0' > INQUIRY: [IMM ][Virtual CD/DVD ][0316] > GET CONFIGURATION failed with SK=5h/ASC=24h/ACQ=00h So your virtual drive rejects the GET CONFIGURATION command as illegal. Other pre-MMC2 drives that don't accept this command usually return the error SK=5h,ASC=20h (invalid/unsupported command code), in which case cdrom_id tries an older method, and then ID_CDROM_MEDIA_TRACK_COUNT_DATA gets set and all the /dev/disk/by-label (etc) links get set up. The virtual drive returns the error SK=5h,ASC=24h (invalid field in Command Descriptor Block), which cdrom_id doesn't handle, so it gives up and the links never get made. The ideal solution would be to make the IMM to emulate a device that's less than 15 years old, but I'm not going to hold my breath waiting for that. So probably cdrom_id should also use the old MMC fallback when the error is SK=5h,ASC=24h, and then all of this would work as expected. Suggested-by:Luca Miccini <lmiccini@redhat.com>
* everywhere: always use O_CLOEXEC where it makes senseLennart Poettering2014-02-131-1/+1
|
* use memzero(foo, length); for all memset(foo, 0, length); callsGreg KH2014-01-311-1/+1
| | | | | | | | In trying to track down a stupid linker bug, I noticed a bunch of memset() calls that should be using memzero() to make it more "obvious" that the options are correct (i.e. 0 is not the length, but the data to set). So fix up all current calls to memset(foo, 0, length) to memzero(foo, length).
* log: log_error() and friends add a newline after each line anyway, so avoid ↵Lennart Poettering2013-12-241-80/+80
| | | | including it in the log strings
* Add more _printf_'s for format-nonliteralsThomas Hindoe Paaboel Andersen2013-12-141-0/+1
| | | | | | | | | | | Clang is a bit more strict wrt format-nonliterals: http://clang.llvm.org/docs/LanguageExtensions.html#format-string-checking Adding these extra printf attributes also makes gcc able to find more problems. E.g. this patch uncovers a format issue in udev-builtin-path_id.c Some parts looked intetional about breaking the format-nonliteral check. I added some supression for warnings there.
* Remove or indent #define GNU_SOURCEZbigniew Jędrzejewski-Szmek2013-03-111-4/+0
| | | | | | | It is only needed in files designed to be usable in standalone compilation. In those files the #ifdefinery is indented. When compiling in-tree, GNU_SOURCE is always defined, so remove one definition.
* cdrom_id: add data track count for bad virtual drive implementationsHarald Hoyer2013-02-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | /# /lib/udev/cdrom_id --debug /dev/sr0 probing: '/dev/sr0' INQUIRY: [AMI ][Virtual CDROM ][1.00] GET CONFIGURATION failed with SK=5h/ASC=20h/ACQ=00h drive is pre-MMC2 and does not support 46h get configuration command trying to work around the problem READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h no current profile, but disc is present; assuming CD-ROM READ TOC: len: 12, start track: 1, end track: 1 last track 1 starts at block 0 READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h ID_CDROM=1 ID_CDROM_MEDIA=1 ID_CDROM_MEDIA_CD=1 What is missing here is ID_CDROM_MEDIA_TRACK_COUNT_DATA to trigger blkid in /lib/udev/rules.d/60-persistent-storage.rules KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \ IMPORT{builtin}="blkid --noraid"
* use the same email address everywhereKay Sievers2012-11-121-1/+1
|
* udev: cdrom_id, accelerometer - enable debug output for --debugKay Sievers2012-07-261-2/+2
|
* udev: add some O_CLOEXECKay Sievers2012-07-051-1/+1
|
* udev: move all unconditionally installed rules to rules/Kay Sievers2012-04-141-20/+0
|
* udev: switch to systemd logging functionsKay Sievers2012-04-081-82/+82
|
* udev: fix gcc warningsKay Sievers2012-04-041-1/+1
|
* move imported udev into placeKay Sievers2012-04-042-0/+1119