From 99bb62f0e99f3c63c1d5cbae4f70dff6d5ff0868 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 21 Mar 2016 04:42:10 +0100 Subject: LINUX: Use classic major/minor macros. Makes our Linux Audio CD code work with implementations without gnu_dev_major and gnu_dev_minor too. --- backends/audiocd/linux/linux-audiocd.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'backends') diff --git a/backends/audiocd/linux/linux-audiocd.cpp b/backends/audiocd/linux/linux-audiocd.cpp index a5838e1c5a..caa0265637 100644 --- a/backends/audiocd/linux/linux-audiocd.cpp +++ b/backends/audiocd/linux/linux-audiocd.cpp @@ -62,6 +62,7 @@ #include #include #include +#include enum { kLeadoutTrack = 0xAA @@ -379,8 +380,9 @@ bool LinuxAudioCDManager::tryAddDrive(DeviceList &devices, const Common::String bool LinuxAudioCDManager::tryAddDrive(DeviceList &devices, dev_t device) { // Construct the block name - // (Does anyone have a better way to do this? bdevname is kernel only) - Common::String name = Common::String::format("/dev/block/%d:%d", gnu_dev_major(device), gnu_dev_minor(device)); + // TODO: libblkid's blkid_devno_to_devname is exactly what we look for. + // This requires an external dependency though. + Common::String name = Common::String::format("/dev/block/%d:%d", major(device), minor(device)); return tryAddDrive(devices, name, device); } -- cgit v1.2.3