/* assumes 32 bit ints */ #include "harddisk.h" extern struct MsgPort *CreatePort(); extern struct IOStdReq *CreateExtIO(); main () { struct IOExtHD *req; struct MsgPort *port; int status; port = CreatePort ( 0 , 0 ); if ( port != NULL ) { req = (struct IOExtHD *) CreateExtIO ( port , sizeof ( struct IOExtHD ) ); if ( req != NULL ) { if ( OpenDevice ( HD_NAME , 0 , req , 0 ) == 0 ) { req->iohd_TD.iotd_Req.io_Command = HD_PARK; if ( DoIO ( req ) == 0 ) { printf ( "Park complete\n" ); } else { printf ( "Park failed\n" ); } CloseDevice ( req ); } DeleteExtIO ( req , sizeof ( struct IOExtHD ) ); } DeletePort ( port ); } }