From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Relating device names in /dev/ to drive letters in Windows.
Date: Mon, 27 Jul 2020 14:44:06 +0200 [thread overview]
Message-ID: <20200727124406.GF4206@calimero.vinschen.de> (raw)
In-Reply-To: <AM0PR05MB489877DBDB1C8ABDC95070EBE7720@AM0PR05MB4898.eurprd05.prod.outlook.com>
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
next prev parent reply other threads:[~2020-07-27 12:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 11:24 Hamish McIntyre-Bhatty
2020-07-27 12:44 ` Corinna Vinschen [this message]
2020-07-27 13:10 ` Brian Inglis
[not found] <mailman.96674.1595867913.8982.cygwin@cygwin.com>
2020-07-28 21:36 ` Hamish McIntyre-Bhatty
-- strict thread matches above, loose matches on Subject: below --
2020-07-23 9:36 Hamish McIntyre-Bhatty
2020-07-23 11:29 ` Hamish McIntyre-Bhatty
2020-07-24 8:45 ` Corinna Vinschen
2020-07-24 16:26 ` Brian Inglis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200727124406.GF4206@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).