Files

54 lines
928 B
Plaintext

seti $printhelp = $printhelp
seti $help = $help
if $help = 1
echo 'sleep.'
echo 'Example: opensuperclone --tool -t /dev/sda -f ata_sleep'
if $printhelp = 1
exit 0
endif
echo 'Hit ENTER to continue...'
userinput $choicestring
previousscript
endif
include good_subroutines.osc
buffersize 0
setreadpio
# set the count and LBA to to 0
seti $count = 0
seti $LBAlow = 0
seti $LBAmid = 0
seti $LBAhigh = 0
# set features to 0
seti $features = 0
# set device bits 7(compatibility) 5(compatibility)
seti $device = 0xa0
# set the command for sleep
seti $command = 0xe6
# perform the command
ata28cmd $features $count $LBAlow $LBAmid $LBAhigh $device $command
# check if command failed
seti $command_failed = 0
gosub check_command_status
if $command_failed = 1
echo "Command failed!"
gosub show_sense_data
gosub show_ata_return_status
previousscript
endif
echo "Command completed"
previousscript
end