public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: Christian Franke <Christian.Franke@t-online.de>
Cc: cygwin-patches@cygwin.com
Subject: Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks
Date: Tue, 7 Nov 2023 14:29:45 +0100	[thread overview]
Message-ID: <ZUo7ydnzBK8HM8FI@calimero.vinschen.de> (raw)
In-Reply-To: <3074268d-edb9-6eef-f486-c9caedb6d54c@t-online.de>

On Nov  7 11:10, Christian Franke wrote:
> Corinna Vinschen wrote:
> > Hi Christian,
> > 
> > On Nov  5 16:45, Christian Franke wrote:
> > > ...
> > > Old IOCTL dropped and code simplified.
> > Great.  I pushed your patch.
> 
> Thanks.
> 
> 
> > ...
> > > > Last, but not least, do you see a chance to add any other /dev/disk
> > > > subdir?  by-partuuid, perhaps?
> > > Possibly, but not very soon. I'm not yet sure which API functions could be
> > > used.
> > > Some early draft ideas:
> > > 
> > > /dev/disk/by-partuid (Partition UUID -> device)
> > >    GPT_PART_UUID -> ../../sdXN (GPT partition UUID)
> > >    MBR_SERIAL-partN -> ../../sdYM (Fake UUID for MBR)
> > That should only require IOCTL_DISK_GET_PARTITION_INFO_EX, I think.
> 
> Easier than expected: DRIVE_LAYOUT_INFORMATION_EX already contains
> PARTITION_INFORMATION_EX so existing scanning function could be enhanced.
> Patch attached.

Nice, pushed!

> > > /dev/disk/by-uuid (Windows Volume UUID -> device)
> > >    Vol_UUID1 -> ../../sdXN  (disk volume)
> > >    Vol_UUID2 -> ../../scd0  (CD/DVD drive volume)
> > >    Vol_UUID3 -> /proc/sys/GLOBAL??/Volume{UUID}  (others, e.g. VeraCrypt
> > > volume)
> > Yeah, tricky. These are not the partition GUIDs but the filesystem
> > GUIDs or serial numbers.  AFAICS, Windows filesystems (FAT*, NTFS)
> > don't maintain a filesystem GUID, as, e. g., ext4 or xfs, but only
> > serial numbers you can fetch via NtQueryVolumeInformationFile.
> > A Linux example of that is the serial number from a FAT32 filesytem
> > as the EFI boot partition in by-uuid:
> > 
> >    lrwxrwxrwx 1 root root 10 Oct 30 10:20 DC38-0407 -> ../../sda1
> > 
> > On second thought, maybe that's sufficient for our by-uuid emulation.
> > 
> > > /dev/disk/by-drive (Cygwin specific: drive letter -> volume)
> > >    c -> ../by-uuid/UUID (if UUID available)
> > >    x -> /proc/sys/DosDevices/X: (others, e.g. Network, "mounted" Volume
> > > Shadow Copy)
> > Ah, good idea. That's what my extension in /proc/partition already
> > provides, but a /dev/disk/by-drive sounds like a great idea.
> 
> Left for later :-)

Looking forward to it. We'll just need an entry for the release text
in winsup/cygwin/release/3.5.0 and doc/new-features.xml in the end :)


Thanks,
Corinna

  reply	other threads:[~2023-11-07 13:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-25 11:57 Christian Franke
2023-10-03 12:39 ` Christian Franke
2023-11-03  9:55   ` Corinna Vinschen
2023-11-03 10:09     ` Corinna Vinschen
2023-11-03 11:06       ` Christian Franke
2023-11-03 11:11         ` Corinna Vinschen
2023-11-03 11:10       ` Corinna Vinschen
2023-11-03 13:27         ` Corinna Vinschen
2023-11-03 16:09           ` Christian Franke
2023-11-03 16:27             ` Corinna Vinschen
2023-11-03 16:30               ` Corinna Vinschen
2023-11-03 17:54                 ` Christian Franke
2023-11-04  9:34                   ` Corinna Vinschen
2023-11-04  9:57                     ` Corinna Vinschen
2023-11-04 11:34                       ` Christian Franke
2023-11-04 15:53                       ` Christian Franke
2023-11-04 20:51                         ` Corinna Vinschen
2023-11-05 15:45                           ` Christian Franke
2023-11-05 19:59                             ` Corinna Vinschen
2023-11-07 10:10                               ` Christian Franke
2023-11-07 13:29                                 ` Corinna Vinschen [this message]
2023-11-07 14:30                                   ` Christian Franke
2023-11-07 15:23                                     ` Corinna Vinschen

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=ZUo7ydnzBK8HM8FI@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=Christian.Franke@t-online.de \
    --cc=cygwin-patches@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).