Cyril Brulebois <k...@debian.org> (28/07/2009): > just to make sure a trace of that patch is kept, I'm opening a bug. > Mainly so that other porters know that a patch is available.
Sadly with a typo. “v2” patch attached, successfully test-built, just to make sure. Mraw, KiBi.
From 17c3b7433fbe090463ab069448abebc8e0da75d1 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois <k...@debian.org> Date: Thu, 23 Jul 2009 02:45:36 +0200 Subject: [PATCH] Only check for ENOMEDIUM when ENOMEDIUM is defined. ENOMEDIUM is Linux-only. On other systems, the open call on a CD-ROM device without any medium may be successful and a subsequent read may return EINVAL instead. Let's just break out of the loop if ENOMEDIUM isn't defined. Signed-off-by: Cyril Brulebois <k...@debian.org> --- lib/fsprobe.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/fsprobe.c b/lib/fsprobe.c index b47de0e..2643c09 100644 --- a/lib/fsprobe.c +++ b/lib/fsprobe.c @@ -31,8 +31,13 @@ open_device(const char *devname) int fd = open(devname, O_RDONLY); if (fd >= 0) return fd; +#ifdef ENOMEDIUM + /* ENOMEDIUM is Linux-only */ if (errno != ENOMEDIUM) break; +#else + break; +#endif if (retries >= CRDOM_NOMEDIUM_RETRIES) break; ++retries; -- 1.6.2.2
signature.asc
Description: Digital signature