#include main() { char ans; printf(" this command reboot the CPU\n"); printf(" all files are lost ( the system is diskless )\n"); printf(" and you will lose the telnet comunication for some minutes"); printf("\n\n Are your sure ?? (n)\n"); ans = getc(stdin); if (is_yes(ans)){ while( (ans = getc(stdin)) == EOF) ; printf("\n\n Realy sure ?? (n)\n"); ans = getc(stdin); if (is_yes(ans)){ printf(" muoioooooo ..... \n"); system("attr -e /h0/cmds/reset_ssm"); system("reset_ssm"); exit (0); } } } is_yes(ans) char ans; { int val; val = 0; if (ans == 'y' || ans == 'Y' ) val = 1; return val; }