* Made the "cdda_text" test application compile again.

* Improved error output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38843 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-09-29 09:17:14 +00:00
parent 5b6fca0639
commit 0945b14311
2 changed files with 11 additions and 6 deletions
@@ -1,6 +1,7 @@
SubDir HAIKU_TOP src tests add-ons kernel file_systems cdda ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems cdda ] ;
UsePrivateHeaders drivers ;
SimpleTest cdda_text
:
@@ -1,17 +1,18 @@
/*
* Copyright 2007, Axel Dörfler, [email protected].
* Copyright 2007-2010, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License.
*/
#include "cdda.h"
#include "cddb.h"
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "cdda.h"
#include "cddb.h"
extern const char* __progname;
@@ -46,8 +47,11 @@ main(int argc, char** argv)
uint8 buffer[1024];
scsi_toc_toc *toc = (scsi_toc_toc *)buffer;
if (read_table_of_contents(fd, toc, sizeof(buffer)) < 0) {
fprintf(stderr, "%s: Retrieving TOC failed", __progname);
status_t status = read_table_of_contents(fd, toc, sizeof(buffer));
if (status != B_OK) {
fprintf(stderr, "%s: Retrieving TOC failed: %s\n", __progname,
strerror(status));
return -1;
}