Commit 391fab8f authored by chrfranke's avatar chrfranke
Browse files

Windows: Print warning if admin rights are missing.


git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@3038 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 4b3cd525
...@@ -43,6 +43,8 @@ NOTES FOR FUTURE RELEASES: see TODO file. ...@@ -43,6 +43,8 @@ NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> <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'. [CF] Replace some 'EXIT(status)' calls by 'return status'.
Remove unnecessary casts from 'nonempty()' calls. Remove unnecessary casts from 'nonempty()' calls.
......
...@@ -2368,6 +2368,15 @@ bool win_ata_device::open(int phydrive, int logdrive, const char * options, int ...@@ -2368,6 +2368,15 @@ bool win_ata_device::open(int phydrive, int logdrive, const char * options, int
} }
set_fh(h); 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) if (con->reportataioctl > 1)
pout("%s: successfully opened%s\n", devpath, (!m_admin ? " (without admin rights)" :"")); pout("%s: successfully opened%s\n", devpath, (!m_admin ? " (without admin rights)" :""));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment