]>
gitweb.michael.orlitzky.com - xfce4-hdaps.git/blob - panel-plugin/hdaps.h
2c900b2a93c3159a4a9417670e2d6d797129f5d1
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
24 #define HDAPS_ERROR -1
26 #define UNLOAD_HEADS_FMT "/sys/block/%s/device/unload_heads"
28 /* The most devices we'll consider. Gotta stop somewhere. */
29 #define MAX_HDAPS_DEVICES 12
31 int parse_int_from_file(const char* filename
);
32 int slurp_file(const char* filename
, char* buf
, int max_bytes
);
33 int get_hdaps_device_list(char list
[MAX_HDAPS_DEVICES
][FILENAME_MAX
]);