Many files:
  Checked in e2fsprogs 0.5c

diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
index 5126583..b995515 100644
--- a/lib/ext2fs/unix_io.c
+++ b/lib/ext2fs/unix_io.c
@@ -15,9 +15,12 @@
 #include <time.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
 
 #include "et/com_err.h"
-#include "ext2_err.h"
+#include "ext2fs/ext2_err.h"
 #include "io.h"
 
 /*
@@ -63,6 +66,8 @@
 	struct unix_private_data *data = NULL;
 	errcode_t	retval;
 
+	if (name == 0)
+		return EXT2_ET_BAD_DEVICE_NAME;
 	io = (io_channel) malloc(sizeof(struct struct_io_channel));
 	if (!io)
 		return ENOMEM;