Skip to content
Snippets Groups Projects
Commit 1191249f authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard
Browse files

kernel32: Check for the correct error return value from open.

parent 089435d4
No related branches found
No related tags found
No related merge requests found
......@@ -161,12 +161,11 @@ static void create_scsi_entry( PSCSI_ADDRESS scsi_addr, LPSTR lpDriver, UINT uDr
int fd, dma;
fd = open(lpUnixDeviceName, O_RDONLY|O_NONBLOCK);
if (fd)
if (fd != -1)
{
if (ioctl(fd, HDIO_GET_DMA, &dma) != -1) value = dma;
close(fd);
}else
ERR("Can't open %s", buffer);
}
#endif
RtlCreateUnicodeStringFromAsciiz( &nameW, "DMAEnabled" );
NtSetValueKey( portKey,&nameW, 0, REG_DWORD, (BYTE *)&value, sizeof(DWORD));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment