delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/07/27/08:44:50

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F06A3846411
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1595853851;
bh=R9v2uTaNKcX2g8pwaNHTQI9+Ljk1TMpcuw1g/OJKrnA=;
h=Date:From:To:Subject:References:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
Reply-To:From;
b=uksCSjimfLqdd/2+6ZzTyB3rwN13C6WQstBrgwJHK/EjozfnJ3CLoFcmtBqOOAR+R
oXP6VO8pvVHkwj2YF6p9HdC6FG6I8dNf9QYRvSnMDS11k5vOcLJWuJm8b8qN0FVVmg
tUflyqjqEI9kmrLyTcQXiqNhChWoGZaHDlrfLCI8=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 38FA83857C6A
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=cygwin.com
Authentication-Results: sourceware.org;
spf=fail smtp.mailfrom=corinna-cygwin AT cygwin DOT com
Date: Mon, 27 Jul 2020 14:44:06 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Relating device names in /dev/ to drive letters in Windows.
Message-ID: <20200727124406.GF4206@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <AM0PR05MB489877DBDB1C8ABDC95070EBE7720 AT AM0PR05MB4898 DOT eurprd05 DOT prod DOT outlook DOT com>
MIME-Version: 1.0
In-Reply-To: <AM0PR05MB489877DBDB1C8ABDC95070EBE7720@AM0PR05MB4898.eurprd05.prod.outlook.com>
X-Provags-ID: V03:K1:V5ifr/uTjq9q2B8mDb3If7n84BmIiiuEyJ5jrYyaq9JtvUlTted
RBjDY+ggHLcvkY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2rEbErhig7KvVALLdTQUQ1E
tPIHHKXG2fpJTYH0yPbw==
X-Spam-Status: No, score=-99.4 required=5.0 tests=BAYES_00,
GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS,
RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT 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
--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019