You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the code I noticed that access() is being called with "/dev/sda" rather than devref. Might cause problems, especially on systems that don't have a /dev/sda! Suggested fix below:
diff --git a/linux/DtaDevLinuxSata.cpp b/linux/DtaDevLinuxSata.cpp
index fa71bd3..d7e90cd 100644
--- a/linux/DtaDevLinuxSata.cpp
+++ b/linux/DtaDevLinuxSata.cpp
@@ -67,7 +67,7 @@ bool DtaDevLinuxSata::init(const char * devref)
LOG(D1) << "Creating DtaDevLinuxSata::DtaDev() " << devref;
bool isOpen = FALSE;
- if(access("/dev/sda", R_OK | W_OK)) {
+ if(access(devref, R_OK | W_OK)) {
LOG(E) << "You do not have permission to access the raw disk in write mode";
LOG(E) << "Perhaps you might try sudo to run as root";
}
The text was updated successfully, but these errors were encountered:
Looking at the code I noticed that
access()
is being called with"/dev/sda"
rather thandevref
. Might cause problems, especially on systems that don't have a /dev/sda! Suggested fix below:The text was updated successfully, but these errors were encountered: