diff --git a/src/Etterna/Globals/StepMania.cpp b/src/Etterna/Globals/StepMania.cpp index 59f0744225..5b5e08aa5a 100644 --- a/src/Etterna/Globals/StepMania.cpp +++ b/src/Etterna/Globals/StepMania.cpp @@ -992,13 +992,6 @@ sm_main(int argc, char* argv[]) FILEMAN = new RageFileManager(argv[0]); FILEMAN->Mount("dir", Core::Platform::getAppDirectory(), "/"); -#ifdef __unix__ - /* Mount the root filesystem, so we can read files in /proc, /etc, and so - * on. This is /rootfs, not /root, to avoid confusion with root's home - * directory. */ - FILEMAN->Mount("dir", "/", "/rootfs"); -#endif - // load preferences and mount any alternative trees. PREFSMAN = new PrefsManager; diff --git a/src/arch/Sound/ALSA9Dynamic.cpp b/src/arch/Sound/ALSA9Dynamic.cpp index 8928579038..ce48b789bc 100644 --- a/src/arch/Sound/ALSA9Dynamic.cpp +++ b/src/arch/Sound/ALSA9Dynamic.cpp @@ -1,6 +1,7 @@ #include "Etterna/Globals/global.h" #include +#include #define ALSA_PCM_NEW_HW_PARAMS_API #define ALSA_PCM_NEW_SW_PARAMS_API @@ -31,7 +32,8 @@ LoadALSA() * know if anyone actually does that, though: they're often configured to * load snd (the core module) if ALSA devices are accessed, but hardware * drivers are typically loaded on boot. */ - if (!IsADirectory("/rootfs/proc/asound/")) + struct stat st; + if (stat("/proc/asound/", &st) == -1 || !(st.st_mode & S_IFDIR)) return "/proc/asound/ does not exist"; ASSERT(Handle == NULL); diff --git a/src/arch/Sound/ALSA9Helpers.cpp b/src/arch/Sound/ALSA9Helpers.cpp index 3305e3ce9c..484ac769f7 100644 --- a/src/arch/Sound/ALSA9Helpers.cpp +++ b/src/arch/Sound/ALSA9Helpers.cpp @@ -5,6 +5,8 @@ #include "ALSA9Dynamic.h" #include "Etterna/Singletons/PrefsManager.h" +#include +#include #include /* int err; must be defined before using this macro */ @@ -160,10 +162,11 @@ Alsa9Buf::GetSoundCardDebugInfo() return; done = true; - if (DoesFileExist("/rootfs/proc/asound/version")) { - std::string sVersion; - GetFileContents("/rootfs/proc/asound/version", sVersion, true); - Locator::getLogger()->info("ALSA: {}", sVersion.c_str()); + std::ifstream f("/proc/asound/version"); + if (f.good()) { + std::string version; + std::getline(f, version); + Locator::getLogger()->info("ALSA: {}", version.c_str()); } InitializeErrorHandler(); diff --git a/src/arch/Sound/RageSoundDriver_OSS.cpp b/src/arch/Sound/RageSoundDriver_OSS.cpp index c0a2269e93..c3bec1e234 100644 --- a/src/arch/Sound/RageSoundDriver_OSS.cpp +++ b/src/arch/Sound/RageSoundDriver_OSS.cpp @@ -17,6 +17,7 @@ #include #include #include +#include REGISTER_SOUND_DRIVER_CLASS(OSS); @@ -145,8 +146,8 @@ RageSoundDriver_OSS::CheckOSSVersion(int fd) */ #ifndef FORCE_OSS #define ALSA_SNDRV_OSS_VERSION ((3 << 16) | (8 << 8) | (1 << 4) | (0)) - if (version == ALSA_SNDRV_OSS_VERSION && - IsADirectory("/rootfs/proc/asound")) + struct stat st; + if( version == ALSA_SNDRV_OSS_VERSION && stat("/proc/asound", &st) && (st.st_mode & S_IFDIR) ) return "RageSoundDriver_OSS: ALSA detected. ALSA OSS emulation is " "buggy; use ALSA natively."; #endif