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 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: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:V5ifr/uTjq9q2B8mDb3If7n84BmIiiuEyJ5jrYyaq9JtvUlTted RBjDY+ggHLcvkY9O61LwFJYxVadhZ0+W4bnLc6YYR32GkbB0UffsvuetOFW47VAYid6Bg3a eCDYSEQSptAJn9QTsCIb8/mT+24W3OINcluZOlByuNL1X9dF7vzz8/A9m/YBy7CdTWAoj+0 LHW9Tdvw0ace2mk0Qv0jg== X-UI-Out-Filterresults: notjunk:1;V03:K0:2lxBcfimnJk=:0zT9Lpx/TK3J/lM9iTBagi TK6u7FIZafQii0gqawwWfrjatvmzTzH/tH+Zd7ESdAWvcWOmkoyb7uwtbz/tDkRBKsllUR75/ tIP3duWyXeMyI1RRKkADkGAngS19Hq5QKWza/KsumkBVaJr3EXTmKXFblhKs33yyNHIDJEfJU oiRPTzieXujCUTY5LriA0iGJFtkpDguG0bGCTCbRIWb0A4AMop6PsqWcPrrBoQrgk5xLUZ9qQ /zF0W6cIglQZ0eGNKn2WRtVIBz3bPGxIcguWFJbVv/DaQKuPtyUAt32K+tMQY2H2qv5/bJic4 zpud28THt/enCxaAAsfnHc44wtYFNkPp+1RZvRKhvgLkTIXmmiH/wQ8HRi4e4/5b8oD0q4UiJ ugYy0HqIFTMkIGbMDRXf2Sfw8RJe3TLz5WtZgOVhqGg/NLDenX30N4roA0WC8mY790NriCi4w /YurSX+6Vbq9pqO2z1BO8X9vrfAAsKd321bHvE2ARi31tH2K9WIuzNCWZqJ71bObgdusbkzwG vYtuTub0FakuQL6Wk81ieqqCt/qFOWslvKvNUBEMPMnBtsbAHN5M7OjQsALRUrb1mnzTaWLmq dBEKrR1eEl3g3D0O7H+JiuXR7gcbNHf1oqo8ySCf1PNN4VBdQZZpBzsXxNC1MkGHSTsVaxFwb HK45mnHYd6+HUBlRjQxqtbuY/kNCMFpI12dqBGNvT6WZmJoNRFg3AOYnglVnxMVt5k8QanpdM ek6xtUwVPZbglohnVooGI+ZJknrbQLxpUEZbB8NxxbCLUFzEPiBREtDvVX6QTSMqzrnuMXLLa RcVAMMPlOuU26PCfDtaEWzi6OZW2ymPZTUGvWlRijxnXJdEumm2rEbErhig7KvVALLdTQUQ1E 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" 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