Wednesday 15 April 2015

c++ - How can I determine which device a loop loops back to? -


I am running Wubi on my Ubuntu system and thus I have a device: / dev / loop0
which is actually the main drive's NTFS file system There is a file. I know that the loopback device does not necessarily indicate the disc, but how do I understand what it is and which disk it back in C (c / c ++ ofc) loops? As

, I am doing some light profiles of the system and want to merge partitions on the loopback from the main disk.

Honestly I do not understand what "light profiling" is with the merger of the partitions Whether you are trying to achieve or what you really are trying to achieve, but it can be done to find out what is related to what loop back device can be done with the file to run the losetup command code as root for it Required so that you can run "Pseudo lisat-A"

This will pars the process itself to create the same trick in C / C ++, open each loop device to find a loop device in use that it is a Loop device is IOctl LOOP_GET_STATUS ioctl LOOP_GET_STATUS64

All important information header file is in linux / loop.h if any of the above sounds are very weird and / or just use losetup obscure.

No comments:

Post a Comment