diff options
author | Christian Franke <christian.franke@t-online.de> | 2023-11-05 15:54:23 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2023-11-05 17:01:43 +0100 |
commit | c8cf1933ba04edf40181545b4c258be059d66f87 (patch) | |
tree | 90be43517bc9e85deadf593fe4b406ff90c3ddef /winsup/cygwin/local_includes/devices.h | |
parent | 12e3bac3ce562007e83c3c67243c85fcb5ee70a4 (diff) | |
download | newlib-c8cf1933ba04edf40181545b4c258be059d66f87.zip newlib-c8cf1933ba04edf40181545b4c258be059d66f87.tar.gz newlib-c8cf1933ba04edf40181545b4c258be059d66f87.tar.bz2 |
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 <christian.franke@t-online.de>
Diffstat (limited to 'winsup/cygwin/local_includes/devices.h')
-rw-r--r-- | winsup/cygwin/local_includes/devices.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/local_includes/devices.h b/winsup/cygwin/local_includes/devices.h index 1003526..1e035f9 100644 --- a/winsup/cygwin/local_includes/devices.h +++ b/winsup/cygwin/local_includes/devices.h @@ -71,6 +71,7 @@ enum fh_devices FH_DEV = FHDEV (DEV_VIRTFS_MAJOR, 193), FH_CYGDRIVE= FHDEV (DEV_VIRTFS_MAJOR, 192), FH_DEV_FD = FHDEV (DEV_VIRTFS_MAJOR, 191), + FH_DEV_DISK= FHDEV (DEV_VIRTFS_MAJOR, 190), FH_SIGNALFD= FHDEV (DEV_VIRTFS_MAJOR, 13), FH_TIMERFD = FHDEV (DEV_VIRTFS_MAJOR, 14), @@ -415,6 +416,8 @@ extern const _device dev_piper_storage; #define piper_dev ((device *) &dev_piper_storage) extern const _device dev_pipew_storage; #define pipew_dev ((device *) &dev_pipew_storage) +extern const _device dev_dev_disk_storage; +#define dev_disk_dev ((device *) &dev_dev_disk_storage) extern const _device dev_proc_storage; #define proc_dev ((device *) &dev_proc_storage) extern const _device dev_dev_storage; @@ -439,7 +442,8 @@ extern const _device dev_fs_storage; #define isprocsys_dev(devn) (devn == FH_PROCSYS) #define isvirtual_dev(devn) \ - (isproc_dev (devn) || devn == FH_CYGDRIVE || devn == FH_NETDRIVE || devn == FH_DEV_FD) + (isproc_dev (devn) || devn == FH_CYGDRIVE || devn == FH_NETDRIVE \ + || devn == FH_DEV_FD || devn == FH_DEV_DISK) #define iscons_dev(n) \ ((device::major ((dev_t) (n)) == DEV_CONS_MAJOR) \ |