diff --git a/smartmontools/CHANGELOG b/smartmontools/CHANGELOG index fc32ae97ddffd3b484ab291d998bb12be9cabd0e..25da9563e9c0ba6e03dc12066068b85048f61d31 100644 --- a/smartmontools/CHANGELOG +++ b/smartmontools/CHANGELOG @@ -43,6 +43,8 @@ NOTES FOR FUTURE RELEASES: see TODO file. <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> + [CF] Windows: Print warning if admin rights are missing. + [CF] Replace some 'EXIT(status)' calls by 'return status'. Remove unnecessary casts from 'nonempty()' calls. diff --git a/smartmontools/os_win32.cpp b/smartmontools/os_win32.cpp index 23c11d869319e0a212101972c70484f5b6026be8..5cd7f96f5cf8ec3dfdfd32dc02c5dae7a704c6da 100644 --- a/smartmontools/os_win32.cpp +++ b/smartmontools/os_win32.cpp @@ -2368,6 +2368,15 @@ bool win_ata_device::open(int phydrive, int logdrive, const char * options, int } set_fh(h); + // Warn once if admin rights are missing + if (!m_admin) { + static bool noadmin_warning = false; + if (!noadmin_warning) { + pout("Warning: Limited functionality due to missing admin rights\n"); + noadmin_warning = true; + } + } + if (con->reportataioctl > 1) pout("%s: successfully opened%s\n", devpath, (!m_admin ? " (without admin rights)" :""));