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: Fri, 3 Nov 2023 12:11:39 +0100 [thread overview]
Message-ID: <ZUTVawTszyMlB4QZ@calimero.vinschen.de> (raw)
In-Reply-To: <c1c6f1f9-82cf-d7c9-b04b-b533a3585238@t-online.de>
On Nov 3 12:06, Christian Franke wrote:
> Corinna Vinschen wrote:
> > > I ran this on Windows 11 and Windows 2K19 in a QEMU/KVM VM. A
> > > \Device\Harddisk0\Partition0 symlink pointing to \Device\Harddisk0\DR0
> > > exists in both cases. I straced it, and found the following debug
> > > output:
> > >
> > > 1015 1155432 [main] ls 361 stordesc_to_id_name: Harddisk0\Partition0: 'Red_Hat' 'VirtIO' '' (ignored)
> > >
> > > Is that really desired?
>
> Yes - if IOCTL_STORAGE_QUERY_PROPERTY{... PropertyStandardQuery} does not
> return a serial number (''), the device is intentionally ignored.
See my other mail I just sent.
> > Thread 1 "ls" hit Breakpoint 2, stordesc_to_id_name (upath=0x7ffffc500,
> > ioctl_buf=0x10e0720 "(", name=...)
> > at /home/corinna/src/cygwin/vanilla/winsup/cygwin/fhandler/dev_disk.cc:44
> > 44 const STORAGE_DEVICE_DESCRIPTOR *desc =
> > (gdb) n
> > 47 int vendor_len = 0, product_len = 0, serial_len = 0;
> > (gdb)
> > 48 if (desc->VendorIdOffset)
> > (gdb)
> > 49 vendor_len = sanitize_id_string (ioctl_buf + desc->VendorIdOffset);
> > (gdb)
> > 50 if (desc->ProductIdOffset)
> > (gdb)
> > 51 product_len = sanitize_id_string (ioctl_buf + desc->ProductIdOffset);
> > (gdb)
> > 52 if (desc->SerialNumberOffset)
> > (gdb)
> > 53 serial_len = sanitize_id_string (ioctl_buf + desc->SerialNumberOffset);
>
> If possibly, please check whether (desc->SerialNumberOffset) is 0 or
> (ioctl_buf + desc->SerialNumberOffset) points to '\0' or a string of spaces.
> If no, there is possibly something wrong in sanitize_id_string().
desc->SerialNumberOffset is > 0, serial_len is 0, it points to an empty
string.
Corinna
next prev parent reply other threads:[~2023-11-03 11:11 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 [this message]
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
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=ZUTVawTszyMlB4QZ@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).