Skip to main content
Sign in
Snippets Groups Projects
Commit 3bef9402 authored by chrfranke's avatar chrfranke
Browse files

Windows: Added '/dev/n?st<n>' as alternate device names for SCSI tapes

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2416 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent f6cc4a20
Branches
No related tags found
No related merge requests found
CHANGELOG for smartmontools
$Id: CHANGELOG,v 1.622 2007/07/19 21:36:38 chrfranke Exp $
$Id: CHANGELOG,v 1.623 2007/07/20 21:00:42 chrfranke Exp $
The most recent version of this file is:
http://smartmontools.cvs.sourceforge.net/smartmontools/sm5/CHANGELOG?view=markup
......@@ -33,6 +33,11 @@ NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
[CF] Windows: Added '/dev/n?st<n>' as alternate device names for SCSI
tapes. These names are also used by Cygwin's /dev emulation layer.
Thanks to Corinna Vinschen (Cygwin project lead) for pointing this
out.
[CF] Windows: Added IOCTL_SCSI_MINIPORT_*SMART* for commands not handled
properly by SMART_IOCTL in disk class driver. This allows to use
READ_LOG, WRITE_LOG and ABORT_SELFTEST even if the driver does not
......
......
......@@ -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.53 2007/07/19 21:36:39 chrfranke Exp $"
const char *os_XXXX_c_cvsid="$Id: os_win32.cpp,v 1.54 2007/07/20 21:00:42 chrfranke Exp $"
ATACMDS_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID SCSICMDS_H_CVSID UTILITY_H_CVSID;
......@@ -190,6 +190,10 @@ int guess_device_type (const char * dev_name)
return CONTROLLER_SCSI;
if (!strncmp(dev_name, "pd", 2))
return CONTROLLER_SCSI;
if (!strncmp(dev_name, "st", 2))
return CONTROLLER_SCSI;
if (!strncmp(dev_name, "nst", 3))
return CONTROLLER_SCSI;
if (!strncmp(dev_name, "tape", 4))
return CONTROLLER_SCSI;
return CONTROLLER_UNKNOWN;
......@@ -310,7 +314,7 @@ int deviceopen(const char * pathname, char *type)
if (sscanf(pathname,"scsi%1u%1x%n", &adapter, &id, &n1) == 2 && n1 == len) {
return aspi_open(adapter, id);
}
// sd[a-z],N => Physical drive 0-26, RAID port N
// sd[a-z],N => Physical drive 0-25, RAID port N
char drive[1+1] = ""; int sub_addr = -1; n1 = -1; int n2 = -1;
if ( sscanf(pathname, "sd%1[a-z]%n,%d%n", drive, &n1, &sub_addr, &n2) >= 1
&& ((n1 == len && sub_addr == -1) || (n2 == len && sub_addr >= 0)) ) {
......@@ -322,8 +326,17 @@ int deviceopen(const char * pathname, char *type)
&& pd_num >= 0 && ((n1 == len && sub_addr == -1) || (n2 == len && sub_addr >= 0))) {
return spt_open(pd_num, -1, sub_addr);
}
// tape<m> => tape drive <m>
// n?st<m> => tape drive <m> (same names used in Cygwin's /dev emulation)
int tape_num = -1; n1 = -1;
if (sscanf(pathname, "st%d%n", &tape_num, &n1) == 1 && tape_num >= 0 && n1 == len) {
return spt_open(-1, tape_num, -1);
}
tape_num = -1; n1 = -1;
if (sscanf(pathname, "nst%d%n", &tape_num, &n1) == 1 && tape_num >= 0 && n1 == len) {
return spt_open(-1, tape_num, -1);
}
// tape<m> => tape drive <m>
tape_num = -1; n1 = -1;
if (sscanf(pathname, "tape%d%n", &tape_num, &n1) == 1 && tape_num >= 0 && n1 == len) {
return spt_open(-1, tape_num, -1);
}
......
......
.ig
Copyright (C) 2002-7 Bruce Allen <smartmontools-support@lists.sourceforge.net>
$Id: smartctl.8.in,v 1.97 2007/07/09 01:57:31 ballen4705 Exp $
$Id: smartctl.8.in,v 1.98 2007/07/20 21:00:43 chrfranke Exp $
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
......@@ -92,9 +92,11 @@ Use the form \fB"/dev/scsi[0\-9][0\-f]"\fP for SCSI devices via an aspi dll
on ASPI adapter 0\-9, ID 0\-15. Alternatively use \fB"/dev/sd[a\-z]"\fP for
SCSI disks "\\\\.\\PhysicalDrive[0\-25]" on WinNT4/2000/XP/2003 (where "a"
maps to "0"). SCSI disks can also be referred to as \fB"/dev/pd[0\-255]"\fP
for "\\\\.\\PhysicalDrive[0\-255]" on WinNT4/2000/XP/2003. Use the
form \fB"/dev/tape[0\-255]"\fP for SCSI tape drives "\\\\.\\Tape[0\-255]"
for "\\\\.\\PhysicalDrive[0\-255]" on WinNT4/2000/XP/2003.
Use one the forms \fB"/dev/tape[0\-255]"\fP, \fB"/dev/st[0\-255]"\fP,
or \fB"/dev/nst[0\-255]"\fP for SCSI tape drives "\\\\.\\Tape[0\-255]"
on WinNT4/2000/XP/2003.
For disks behind 3ware 9000 controllers use \fB"/dev/hd[a\-j],N"\fP where
N specifies the disk number (3ware \'port\') behind the controller
providing the logical drive (\'unit\') specified by \fB"/dev/hd[a\-j]"\fP.
......@@ -1475,7 +1477,7 @@ these documents may be found in the References section of the
.SH
CVS ID OF THIS PAGE:
$Id: smartctl.8.in,v 1.97 2007/07/09 01:57:31 ballen4705 Exp $
$Id: smartctl.8.in,v 1.98 2007/07/20 21:00:43 chrfranke Exp $
.\" Local Variables:
.\" mode: nroff
.\" End:
.ig
Copyright (C) 2002-7 Bruce Allen <smartmontools-support@lists.sourceforge.net>
$Id: smartd.8.in,v 1.115 2007/07/09 01:57:31 ballen4705 Exp $
$Id: smartd.8.in,v 1.116 2007/07/20 21:00:43 chrfranke Exp $
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -117,8 +117,10 @@ configuration file and only apply to WinNT4/2000/XP/2003. The
form \fB"/dev/sd[a\-z]"\fP can be given for SCSI
disks "\\\\.\\PhysicalDrive[0\-25]" (where "a" maps to "0"). Additionally
the form \fB"/dev/pd[0\-255]"\fP can be given for SCSI
disks "\\\\.\\PhysicalDrive[0\-255]". The form \fB"/dev/tape[0\-255]"\fP
can be given for SCSI tape drives "\\\\.\\Tape[0\-255]".
disks "\\\\.\\PhysicalDrive[0\-255]".
One the forms \fB"/dev/tape[0\-255]"\fP, \fB"/dev/st[0\-255]"\fP,
or \fB"/dev/nst[0\-255]"\fP can be given for SCSI tape
drives "\\\\.\\Tape[0\-255]".
.IP \fBCYGWIN\fP: 9
See "WINDOWS" above.
.IP \fBOS/2,eComStation\fP: 9
......@@ -1956,4 +1958,4 @@ smartmontools home page at \fBhttp://smartmontools.sourceforge.net/#references\f
.SH
CVS ID OF THIS PAGE:
$Id: smartd.8.in,v 1.115 2007/07/09 01:57:31 ballen4705 Exp $
$Id: smartd.8.in,v 1.116 2007/07/20 21:00:43 chrfranke Exp $
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment