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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple