diff --git a/sm5/CHANGELOG b/sm5/CHANGELOG index 1c21b7dac34f5d046be9bb19eb6f2a98c4e86903..b69bbae20ce0950d109946119f54c655ba06316b 100644 --- a/sm5/CHANGELOG +++ b/sm5/CHANGELOG @@ -1,6 +1,6 @@ CHANGELOG for smartmontools -$Id: CHANGELOG,v 1.628 2007/07/28 13:17:38 chrfranke Exp $ +$Id: CHANGELOG,v 1.629 2007/08/19 14:29:45 chrfranke Exp $ The most recent version of this file is: http://smartmontools.cvs.sourceforge.net/smartmontools/sm5/CHANGELOG?view=markup @@ -33,6 +33,9 @@ NOTES FOR FUTURE RELEASES: see TODO file. <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> + [CF] Windows: Modified drive letter handling for explorer drive + context menu: try SCSI if type is unknown, allow 'X:\.' syntax. + [CF] Windows: Added automatic ATA/SCSI device type detection and SCSI device scanning. The device names '/dev/sdX' and '/dev/pd<n>' now work for both ATA and SCSI disks. diff --git a/sm5/os_win32.cpp b/sm5/os_win32.cpp index fd8b01159cc4219e716bea5d72e92470dcc878e0..3a78d357faf73f56d5bcdf9fb5a0e255b960e3f0 100644 --- a/sm5/os_win32.cpp +++ b/sm5/os_win32.cpp @@ -44,7 +44,7 @@ extern int64_t bytes; // malloc() byte count // Needed by '-V' option (CVS versioning) of smartd/smartctl -const char *os_XXXX_c_cvsid="$Id: os_win32.cpp,v 1.56 2007/07/28 13:17:38 chrfranke Exp $" +const char *os_XXXX_c_cvsid="$Id: os_win32.cpp,v 1.57 2007/08/19 14:29:45 chrfranke Exp $" ATACMDS_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID SCSICMDS_H_CVSID UTILITY_H_CVSID; @@ -174,12 +174,14 @@ static int is_permissive() } // return number for drive letter, -1 on error -// "[A-Za-z]:[/\\]?" => 0-25 +// "[A-Za-z]:([/\\][.]?)?" => 0-25 // Accepts trailing '"' to fix broken "X:\" parameter passing from .bat files static int drive_letter(const char * s) { return ( (('A' <= s[0] && s[0] <= 'Z') || ('a' <= s[0] && s[0] <= 'z')) - && s[1] == ':' && (!s[2] || (strchr("/\\\"", s[2]) && !s[3])) ? + && s[1] == ':' + && (!s[2] || ( strchr("/\\\"", s[2]) + && (!s[3] || (s[3] == '.' && !s[4]))) ) ? (s[0] & 0x1f) - 1 : -1); } @@ -208,8 +210,10 @@ int guess_device_type (const char * dev_name) if (!strncmp(dev_name, "tape", 4)) return CONTROLLER_SCSI; int logdrive = drive_letter(dev_name); - if (logdrive >= 0) - return get_controller_type(-1, logdrive); + if (logdrive >= 0) { + int type = get_controller_type(-1, logdrive); + return (type != CONTROLLER_UNKNOWN ? type : CONTROLLER_SCSI); + } char drive[1+1] = ""; if (sscanf(dev_name, "sd%1[a-z]", drive) == 1) return get_controller_type(drive[0]-'a', -1);