From e1fe098be62d802ca395b6b8390cb3020dcda046 Mon Sep 17 00:00:00 2001 From: Veit Heller Date: Sun, 21 Sep 2014 20:37:28 +0200 Subject: [PATCH] Bugfixes --- src/cd_check_capabilities.c | 2 +- src/cd_check_read.c | 2 +- src/cd_check_read_toc.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cd_check_capabilities.c b/src/cd_check_capabilities.c index c0cbd0a..c792c6c 100644 --- a/src/cd_check_capabilities.c +++ b/src/cd_check_capabilities.c @@ -33,7 +33,7 @@ int main(){ (caps & CDC_CLOSE_TRAY) ? "yes" : "no", (caps & CDC_LOCK) ? "yes" : "no", (caps & CDC_PLAY_AUDIO) ? "yes" : "no", - (caps & CDC_SELECT_DISK) ? "yes" : "no"); + (caps & CDC_SELECT_DISC) ? "yes" : "no"); close(fd); return 0; diff --git a/src/cd_check_read.c b/src/cd_check_read.c index d52baba..9385cdd 100644 --- a/src/cd_check_read.c +++ b/src/cd_check_read.c @@ -15,7 +15,7 @@ int main(){ struct cdrom_tocentry toc_entry; struct cdrom_msf start_stop; - if((fd = open("/dev/cdrom", O_RDONLY) == -1) + if((fd = open("/dev/cdrom", O_RDONLY)) == -1) die(127, "cd_check_read: Cannot open /dev/cdrom"); toc_entry.cdte_track = 1; diff --git a/src/cd_check_read_toc.c b/src/cd_check_read_toc.c index a418bb5..2971abe 100644 --- a/src/cd_check_read_toc.c +++ b/src/cd_check_read_toc.c @@ -12,7 +12,8 @@ static inline void die(int code, const char* message){ } int main(){ - register int fd, i; + register int fd; + register unsigned char i; struct cdrom_tochdr toc_hdr; struct cdrom_tocentry toc_entry;