+ std::string tspath;
+ if(ePythonConfigQuery::getConfigValue("config.usage.timeshift_path", tspath) == -1) {
+ eDebug("could not query ts path from config");
+ }
+ tspath.append("/");
+
+#if 0
+ DIR *tsdir_info;
+ struct dirent *tsdir_entry;
+ tsdir_info = opendir("/sys/block");
+ if (tsdir_info != NULL) {
+ m_hdd_connected = false;
+ while (tsdir_entry = readdir(tsdir_info)) {
+ if (strncmp(tsdir_entry->d_name, "sd", 2) == 0) {
+ eDebug("HDD found: %s", tsdir_entry->d_name);
+ m_hdd_connected = true;
+ break;
+ }
+ }
+ }
+#else
+ struct stat tspath_st;
+ if (stat(tspath.c_str(), &tspath_st) == 0) {
+ if (major(tspath_st.st_dev) == MAJORSD_) {
+ eDebug("Timeshift location on HDD!");
+ m_hdd_connected = true;
+ } else if (major(tspath_st.st_dev) == MAJORMMCBLK) {
+ eDebug("Timeshift location on eMMC!");
+ m_hdd_connected = false;
+ }
+ }
+#endif
+