Commit Graph

59 Commits

Author SHA1 Message Date
Thomas Hindoe Paaboel Andersen 9091e686f4 Add more _printf_'s for format-nonliterals
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.
2013-12-14 13:32:22 +01:00
Zbigniew Jędrzejewski-Szmek 24be982274 Remove or indent #define GNU_SOURCE
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.
2013-03-11 18:03:13 -04:00
Harald Hoyer a0ec302b93 cdrom_id: add data track count for bad virtual drive implementations
/# /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"
2013-02-12 15:27:30 +01:00
Kay Sievers 1298001ec5 use the same email address everywhere 2012-11-12 19:47:43 +01:00
Kay Sievers e239cd8de0 udev: cdrom_id, accelerometer - enable debug output for --debug 2012-07-26 12:03:25 +02:00
Kay Sievers 47ef94ac5f udev: add some O_CLOEXEC 2012-07-05 17:33:24 +02:00
Kay Sievers baa30fbc2c udev: switch to systemd logging functions 2012-04-08 16:06:20 +02:00
Kay Sievers fc863deada udev: fix gcc warnings 2012-04-04 05:21:35 +02:00
Kay Sievers 3e2147858f move imported udev into place 2012-04-04 05:05:07 +02:00
Renamed from src/udev/src/cdrom_id/cdrom_id.c (Browse further)