/[gentoo-x86]/sys-fs/udftools/files/cdrwtool-linux2.6-fix-v2.patch
Gentoo

Contents of /sys-fs/udftools/files/cdrwtool-linux2.6-fix-v2.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Dec 30 23:42:06 2004 UTC (9 years, 7 months ago) by dsd
Branch: MAIN
CVS Tags: HEAD
Updated 2.6 compatibility patch, now also works with Linux 2.4 thanks to Ben Peddell <klightspeed@klightspeed.is-a-geek.net>

1 Fix CD blanking for kernels 2.6.8 and newer
2 (write access is required to perform blanking commands)
3
4 The original version broke support on Linux 2.4, thanks to Ben Peddell for pointing
5 this out to me, and for the updated patch.
6
7 - Daniel Drake <dsd@gentoo.org>
8 - Ben Peddell <klightspeed@klightspeed.is-a-geek.net>
9
10 --- udftools-1.0.0b3/cdrwtool/main.c.orig 2004-12-30 22:53:52.000000000 +0000
11 +++ udftools-1.0.0b3/cdrwtool/main.c 2004-12-30 22:54:36.000000000 +0000
12 @@ -242,7 +242,9 @@ int main(int argc, char *argv[])
13 udf_init_disc(&disc.udf_disc);
14 strcpy(filename, CDROM_DEVICE);
15 parse_args(argc, argv, &disc, filename);
16 - if ((fd = open(filename, O_RDONLY | O_NONBLOCK)) < 0)
17 + if (((fd = open(filename, O_RDWR | O_NONBLOCK)) < 0) &&
18 + ((errno != EROFS) ||
19 + ((fd = open(filename, O_RDONLY | O_NONBLOCK)) < 0)))
20 {
21 perror("open cdrom device");
22 return fd;

  ViewVC Help
Powered by ViewVC 1.1.20