]>
gitweb.michael.orlitzky.com - xfce4-hdaps.git/blob - panel-plugin/hdaps.h
2 * xfce4-hdaps, an XFCE4 panel plugin for the HDAPS system.
4 * Copyright Michael Orlitzky
6 * http://michael.orlitzky.com/
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * http://www.fsf.org/licensing/licenses/gpl.html
26 #define HDAPS_ERROR -1
29 #define UNLOAD_HEADS_FMT "/sys/block/%s/device/unload_heads"
31 /* The most devices we'll consider. Gotta stop somewhere. */
32 #define MAX_HDAPS_DEVICES 12
34 int parse_int_from_file(const char* filename
);
35 int slurp_file(const char* filename
, char* buf
, int max_bytes
);
36 int get_hdaps_device_list(char list
[MAX_HDAPS_DEVICES
][FILENAME_MAX
]);