[PATCH] 0.5.5.1 - usw O_NONBLOCK for CD-ROM in probe-volume.c

Andrey Borzenkov arvidjaar at mail.ru
Wed Jan 4 02:55:17 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Else probing fails with dev.cdrom.check_media enabled.

- -andrey

- --- hal-0.5.5.1/hald/linux2/probing/probe-volume.c.orig	2005-11-14 19:16:04.000000000 +0300
+++ hal-0.5.5.1/hald/linux2/probing/probe-volume.c	2006-01-04 13:30:19.000000000 +0300
@@ -339,7 +339,10 @@ main (int argc, char *argv[])
 
 	dbg ("Doing probe-volume for %s\n", device_file);
 
- -	fd = open (device_file, O_RDONLY);
+	if (is_disc)
+		fd = open (device_file, O_RDONLY|O_NONBLOCK);
+	else
+		fd = open (device_file, O_RDONLY);
 	if (fd < 0)
 		goto out;
 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDu6mWR6LMutpd94wRAh6xAJ46HWQyHo+gzjPXa45yZr02J9gz3ACfaiKI
tdBC+4aFo29kY2IOzgudNW8=
=LN+U
-----END PGP SIGNATURE-----


More information about the hal mailing list