diff --git a/main.cpp b/main.cpp index b83de60..d297502 100644 --- a/main.cpp +++ b/main.cpp @@ -446,6 +446,14 @@ int main() return 1; } + if (smartList.size() == 0) + { + endwin(); + std::cerr << "No S.M.A.R.T readable devices." << std::endl; + std::cerr << "If you are non-root user, please use sudo or become root." << std::endl; + return 1; + } + WINDOW * windowVersion; windowVersion = newwin(1, width, 0, 0);