From ca863c7920b33ea1f093bfdfaab5229505165aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Wed, 23 Aug 2006 15:11:06 +0000 Subject: [PATCH] error is in errno, as noticed by axeld! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18587 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/mkdos/mkdos.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/mkdos/mkdos.cpp b/src/bin/mkdos/mkdos.cpp index 6c21dd4141..a9aa9a62a9 100644 --- a/src/bin/mkdos/mkdos.cpp +++ b/src/bin/mkdos/mkdos.cpp @@ -28,6 +28,7 @@ THE SOFTWARE. #include #include #include +#include #include #include #include @@ -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; }