#ifndef __HDAPS_H__ #define __HDAPS_H__ #define HDAPS_ERROR -1 #define HDAPS_OFF 0 #define UNLOAD_HEADS_FMT "/sys/block/%s/device/unload_heads" /* The most devices we'll consider. Gotta stop somewhere. */ #define MAX_HDAPS_DEVICES 12 int parse_int_from_file(const char* filename); int slurp_file(const char* filename, char* buf, int max_bytes); int get_hdaps_device_list(char list[MAX_HDAPS_DEVICES][FILENAME_MAX]); #endif