Reimplemented Read/WriteFile to use server file descriptors.
Removed file position hack as it is wrong for Win32 (should be redone
for Win16 only).
diff --git a/files/dos_fs.c b/files/dos_fs.c
index 2120131..5dfb7e6 100644
--- a/files/dos_fs.c
+++ b/files/dos_fs.c
@@ -648,22 +648,15 @@
handle = HFILE_ERROR32;
return handle;
}
- if (!strcmp(DOSFS_Devices[i].name,"SCSIMGR$")) {
- if ((handle = FILE_Alloc( &file, -1 )) == INVALID_HANDLE_VALUE32)
- return HFILE_ERROR32;
- else {
- file->unix_name = HEAP_strdupA( SystemHeap, 0, name );
- return handle;
- }
+ if (!strcmp(DOSFS_Devices[i].name,"SCSIMGR$") ||
+ !strcmp(DOSFS_Devices[i].name,"HPSCAN"))
+ {
+ int fd = open( "/dev/null", unixmode );
+ if ((handle = FILE_Alloc( &file, fd )) == INVALID_HANDLE_VALUE32)
+ return HFILE_ERROR32;
+ file->unix_name = HEAP_strdupA( SystemHeap, 0, name );
+ return handle;
}
- if (!strcmp(DOSFS_Devices[i].name,"HPSCAN")) {
- if ((handle = FILE_Alloc( &file, -1 )) == INVALID_HANDLE_VALUE32)
- return HFILE_ERROR32;
- else {
- file->unix_name = HEAP_strdupA( SystemHeap, 0, name );
- return handle;
- }
- }
FIXME(dosfs,"device open %s not supported (yet)\n",DOSFS_Devices[i].name);
return HFILE_ERROR32;
}