Relating device names in /dev/ to drive letters in Windows.

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Jul 27 12:44:06 GMT 2020


On Jul 27 12:24, Hamish McIntyre-Bhatty via Cygwin wrote:
> Thanks Corinna and Brian.
> 
> smartmontools does help - I can see make and model, which is definitely
> helpful.
> 
> Oh, I guess I just didn't have blkid installed then. I'll fix that.
> 
> Brian,
> 
> I'd be happy to attempt implementing this, but I'm not sure where to
> start. With the information you've given me I should be able to figure
> something out, but I'm not sure how this is done in Linux/a POSIX
> compliant way. Would be be through a file and directory structure or
> through some libraries?

In theory, the Cygwin DLL has to provide stuff through ioctl's after
opening the device file.  There are already quite a few ioctl's
supported, namely

HDIO_GETGEO, BLKGETSIZE, BLKGETSIZE64, BLKRRPART, BLKSSZGET, BLKIOMIN,
BLKIOOPT, BLKPBSZGET, BLKALIGNOFF, RDIOCDOP subcommand RDSETBLK,
RDIOCGET.

Whatever is missing *and* is provided by the WinAPI function
DeviceIoControl (or, actually, any other way) can be added to
Cygwin's ioctl API as you see fit.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer


More information about the Cygwin mailing list