From: Andreas M. <an...@us...> - 2013-01-13 10:00:36
|
Hi, On Sun, Jan 13, 2013 at 02:09:29AM +0000, sma...@li... wrote: > Date: Sat, 12 Jan 2013 16:29:34 -0600 > From: Kyl Scott <kyl...@ti...> Let me just say that this email was perfect (I especially liked the "idiot" part, but I'm sure the controller details might be helpful to some people as well). > Whereupon I read the MSDN description which pointed out that little > detail about having to be running in adminstrator mode for it to work > with win7/vista and GENERIC_WRITE... > > So starting my command window in administrator mode allows the latest > official release to work just fine and the 1882ix is now recognized. > Umm, yeah, I did mention idiot... ;) > > So the question I am wondering about is whether it makes sense to add a > message (or maybe even a permission check) to smartctl about > administrator mode on windows and warn newcomers like me when their > requested controller is not found due to improper invocation? This > requirement is probably in the docs somewhere, but I missed it when I > was skimming over things (still not used to UAC, at all). Not a big > deal either way, but I thought I would toss the idea out there. If it > is a foolish one, then please freely ignore it. ;) It seems like such a warning would be very desireable from a usability POV. Rather than doing a broad admin-permissions check and always printing such a warning on permission failure (which might or might not be correct about a request actually subsequently failing due to permissions), which would be a rather unspecific way of checking this, it should probably be implemented in the most direct way possible. I.e. directly check for request failure in Win32 code layer, and generate such a warning message, either by generating it right in the request handling layer (dirty), or perhaps signalling permission error to upper smartmontools handling via a smartmontools-specific error enum, for upper handling to then be able to generate an appropriate error. Possible pseudo code: res = do_request_inner_win32(); if (failed(res) && perms_failure_probable(res)) { if (insufficient_perms_win32() /* do UAC checks and such */) res = SMARTMON_INSUFFICIENT_PERMS; } If nobody is (avail~)able to fully implement such a check currently, then at least a prominent FIXME comment should be added immediately. Andreas Mohr |