wok rev 19025

syslinux/win32.c: fix write sector
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Apr 02 18:58:38 2016 +0200 (2016-04-02)
parents 4a14b5817b3a
children 7d5aee943f85
files syslinux/stuff/iso2exe/win32.c
line diff
     1.1 --- a/syslinux/stuff/iso2exe/win32.c	Sat Apr 02 17:08:51 2016 +0200
     1.2 +++ b/syslinux/stuff/iso2exe/win32.c	Sat Apr 02 18:58:38 2016 +0200
     1.3 @@ -102,7 +102,7 @@
     1.4  		strcpy(devname, "\\\\.\\A:");
     1.5  		devname[4] += drive;
     1.6  	}
     1.7 -	hDevice = CreateFile (devname, GENERIC_READ, 
     1.8 +	hDevice = CreateFile (devname, (mode == MODE_READ) ? GENERIC_READ : GENERIC_WRITE, 
     1.9  		FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
    1.10  	if (hDevice == INVALID_HANDLE_VALUE)
    1.11  		return -1;