open() fails with -1
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20820 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
66a4a42802
commit
43404c50c4
@ -29,6 +29,7 @@
|
||||
#include "debug.h"
|
||||
#include "driver_io.h"
|
||||
#include <MediaDefs.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
float SAMPLE_RATES[] = {
|
||||
@ -198,9 +199,10 @@ status_t MultiAudioDevice::InitDriver()
|
||||
CALLED();
|
||||
|
||||
//open the device driver for output
|
||||
fd = open( fDevice_path, O_WRONLY );
|
||||
fd = open(fDevice_path, O_WRONLY);
|
||||
|
||||
if ( fd == 0 ) {
|
||||
if (fd == -1) {
|
||||
fprintf(stderr, "Failed to open %s: %s\n", fDevice_path, strerror(errno));
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user