Let's assume that a PC contains several storage devices and we have C++/Qt utility which contains 2 blackbox functions (we don't consider their implementation here):
QString get_disk_serial(int drive_number); //for Windows
QString get_disk_serial(const QString& device); //for Linux. For example, "/dev/sda"
I need to know (using C++) which disk is used in the current session (what disk number is active/what device name is active). In my context active disk is a disk which contains the partition, which in turn contains running operating system.
Aucun commentaire:
Enregistrer un commentaire