error is in errno, as noticed by axeld!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18587 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2006-08-23 15:11:06 +00:00
parent 67bcce94f7
commit ca863c7920
+2 -1
View File
@@ -28,6 +28,7 @@ THE SOFTWARE.
#include <ByteOrder.h>
#include <Drivers.h>
#include <OS.h>
#include <errno.h>
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
@@ -152,7 +153,7 @@ status_t Initialize(int fatbits, const char *device, const char *label, bool nop
int fd = open(device, O_RDWR);
if (fd < 0) {
fprintf(stderr,"Error: couldn't open file for device %s %s\n",device, strerror(fd));
fprintf(stderr, "Error: couldn't open file for device %s (%s)\n", device, strerror(errno));
return B_ERROR;
}