14 #include <sys/types.h>
30 strncpy(devname, device + 5,
sizeof(devname));
33 "/sys/block/%s/device/unload_heads", devname);
66 write_int(
"/sys/class/leds/hp::hddprotect/brightness", on);
103 fprintf(stderr,
"usage: %s <device> (default: /dev/sda)\n",
110 perror(
"/dev/freefall");
124 ret =
read(fd, &count,
sizeof(count));
131 if (ret !=
sizeof(count)) {