| 309 | } |
| 310 | |
| 311 | int hard_reboot() |
| 312 | { |
| 313 | struct libusb_device_handle *rebootor; |
| 314 | int r; |
| 315 | |
| 316 | rebootor = open_usb_device( 0x16C0, 0x0477 ); |
| 317 | |
| 318 | if (!rebootor) |
| 319 | return 0; |
| 320 | |
| 321 | r = libusb_control_transfer( rebootor, |
| 322 | 0x21, 9, 0x0200, 0, |
| 323 | (unsigned char*)"reboot", 6, |
| 324 | 100 ); |
| 325 | |
| 326 | libusb_release_interface( rebootor, 0 ); |
| 327 | libusb_close( rebootor ); |
| 328 | |
| 329 | if (r < 0) |
| 330 | return 0; |
| 331 | |
| 332 | return 1; |
| 333 | } |
| 334 | |
| 335 | #endif |
| 336 |
no test coverage detected
searching dependent graphs…