From c8cf1933ba04edf40181545b4c258be059d66f87 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Sun, 5 Nov 2023 15:54:23 +0100 Subject: Cygwin: Add /dev/disk/by-id symlinks The new directory '/dev/disk/by-id' provides symlinks for each disk and its partitions: 'BUSTYPE-[VENDOR_]PRODUCT_SERIAL[-partN]' -> '../../sdX[N]'. This is based on strings provided by STORAGE_DEVICE_DESCRIPTOR. If this information is too short, a 128-bit hash of the STORAGE_DEVICE_UNIQUE_IDENTIFIER raw data is added. Administrator privileges are not required. Signed-off-by: Christian Franke --- winsup/cygwin/dtable.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'winsup/cygwin/dtable.cc') diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 21d5253..9508f3e 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -585,6 +585,9 @@ fh_alloc (path_conv& pc) case FH_DEV: fh = cnew (fhandler_dev); break; + case FH_DEV_DISK: + fh = cnew (fhandler_dev_disk); + break; case FH_DEV_FD: fh = cnew (fhandler_dev_fd); break; -- cgit v1.1