This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Smartmontools don't work with /dev/stX, /dev/nstX

Corinna Vinschen wrote:

ATA/SCSI autodetection is also still missing, therefore it is required to use /dev/hdX for ATA, and /dev/sdX for SCSI (or ATA behind SATL) disks.
This is also not consistent with Cygwin's device names, but more difficult to fix.

I have another strange behaviour which I'm wondering how to solve. I'm runing XP on a mainboard with ATI SB600 SATA controller in "native IDE" mode(*). When I run smartctl onthe only drive in the machine, I get the following reply:

  $ /usr/sbin/smartctl.exe -i /dev/sda
  smartctl version 5.37 [i686-cygwin-xp-sp2] Copyright (C) 2002-6 Bruce Allen
  Home page is

  Device: ATI      1+0 JBOD         Version: 1.10
  Device type: disk
  Local Time is: Sun Jun 17 18:07:28 2007 WEST
  Device does not support SMART

Any idea why I don't get actual drive information but the name of
the controller instead?  Any way around this?

This is the SCSI INQUIRY data from SCSI_PASS_THROUGH ioctl.

To access ATA devices, try device name "/dev/hda" instead.
This should print ATA IDENTIFY data from SMART_RCV_DRIVE_DATA ioctl.
(unfortunately not implemented in all drivers).

BTW: For programs like smartmontools, hdparm or sdparm, which need I/O-controls unsupported by Cygwin, it would be useful to rely on Cygwin's open().
Is there a function to obtain the Windows HANDLE from a Cygwin fd (the opposite of cygwin_attach_handle_to_fd())?


#include <sys/cygwin.h>

  int fd = open(...);
  HANDLE h = (HANDLE) get_osfhandle (fd);



-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]