]> gitweb.michael.orlitzky.com - xfce4-hdaps.git/blob - panel-plugin/hdaps.h
4624daeb0f9fdeb1b82fcf2fbcb53fb12a5c9a52
[xfce4-hdaps.git] / panel-plugin / hdaps.h
1 #ifndef __HDAPS_H__
2 #define __HDAPS_H__
3
4 #define HDAPS_ERROR -1
5 #define HDAPS_OFF 0
6 #define UNLOAD_HEADS_FMT "/sys/block/%s/device/unload_heads"
7
8 /* The most devices we'll consider. Gotta stop somewhere. */
9 #define MAX_HDAPS_DEVICES 12
10
11 int parse_int_from_file(const char* filename);
12 int slurp_file(const char* filename, char* buf, int max_bytes);
13 int get_hdaps_device_list(char list[MAX_HDAPS_DEVICES][FILENAME_MAX]);
14
15 #endif