comparison cddb-id.c @ 7:ad83a38c3f5a

Don't open RW - not necessary.
author darius
date Thu, 18 Jul 2002 06:29:35 +0000
parents 74031379d3cb
children
comparison
equal deleted inserted replaced
6:f5daa3cdeb58 7:ad83a38c3f5a
55 usage(); 55 usage();
56 break; 56 break;
57 } 57 }
58 } 58 }
59 59
60 if ((cd_fd = open(cd_path, O_RDWR)) == -1) { 60 if ((cd_fd = open(cd_path, O_RDONLY)) == -1) {
61 warnx("Failed to open %s, reason: %s", cd_path, strerror(errno)); 61 warnx("Failed to open %s, reason: %s", cd_path, strerror(errno));
62 exit(EX_IOERR); 62 exit(EX_IOERR);
63 } 63 }
64 64
65 if (ioctl(cd_fd, CDIOREADTOCHEADER, &toc_head) == -1) { 65 if (ioctl(cd_fd, CDIOREADTOCHEADER, &toc_head) == -1) {