crossmeta/sys

losetup assign drive letter to device object

Opened this issue · 1 comments

The loop back devices created by losetup can optionally defined DosDevice name to assign drive letter. This will be useful for WIN32 programs to make use of loop back device.
For example when s3backer is ready the file can be used as disk to create NTFS file system on it.

There is lot more to this than simple DefineDosDevice call. The NtCreateSymbolicLinkObject() is now very restrictive in defining symbolic link in global space \GLOBAL??
After this the device \Device\loop should make use of NT mount manager properly.

Refs:
https://blog.macrium.com/virtual-disk-drivers-uac-and-nt-20c1cfc3933e
The filedisk tools from http://www.acc.umu.se/~bosse/ or http://branten.se/nt/ is useful.