+#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
+ if (m_tspath.empty())
+ defaultTSPath(m_is_timeshift);
+
+ struct stat tspath_st;
+ if (stat(m_tspath.c_str(), &tspath_st) == 0) {
+ if (major(tspath_st.st_dev) == MAJORSD_) {
+ eDebug("%s location on HDD!", m_tspath.c_str());
+ m_hdd_connected = true;
+ } else if (major(tspath_st.st_dev) == MAJORMMCBLK) {
+ eDebug("%s location on eMMC!", m_tspath.c_str());
+ m_hdd_connected = false;
+ } else {
+ eDebug("%s location on other device", m_tspath.c_str());
+ }
+ } else {
+ eDebug("stat failed!");
+ }
+#endif
+