I apologize in advance for posting something that is probably more of
use in the developer's list, but I want the maximum eyeballs to look and
tell me a few things.

First, can anyone tell me if this code depends on libraries that have
been removed from LEAF?  I am running the pre-release EigerStien 2.2.19
copy.  When I compile this code on a Debian development box, it seems to
run OK, then when I move it to the router, it gives me a segmentation
fault.  I can't even get it to tell me how to use it (i.e. #:sdmotor )
without it dieing.

Second, has anyone a better way to spin down a SCSI drive that throws
heat like the sun?  I have a full-size Seagate that has a whine worse
than my wife, and throws heat like a bastard.  After I load from the
drive, I want to power it down.  Any suggestions?


Thanks in advance

Tony



>/*
> * sdmotor - start/stop scsi drive spindle
> */
>
>#include       <scsi/scsi_ioctl.h>
>#include       <sys/ioctl.h>
>#include       <errno.h>
>#include       <stdio.h>
>#include       <string.h>
>
>struct s {
>       int     inlen,
>               outlen;
>       char    cdb[6];
>};
>
>main( int argc, char *argv[])
>{
>       struct s        c;
>
>       memset( &c, 0, sizeof c);
>       c.cdb[0] = 0x1B;
>       if (argc != 2)
>               return (usage( ));
>       if (strcmp( argv[1], "start") == 0)
>               c.cdb[4] = 1;
>       else if (strcmp( argv[1], "stop") != 0)
>               return (usage( ));
>       if (ioctl( 0, SCSI_IOCTL_SEND_COMMAND, &c) == 0)
>               return (0);
>       fprintf( stderr, "ioctl failed (%s)\n", strerror( errno));
>       return (1);
>}
>
>usage( )
>{
>
>       fprintf( stderr, "usage: sdmotor { start | stop }\n");
>       return (2);
>}


_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-user

Reply via email to