root/lm-sensors/tags/V2-10-2/lib/proc.h

Revision 3093, 1.3 kB (checked in by mmh, 3 years ago)

(mmh)
This patch adds the files lib/sysfs.h and lib/sysfs.c, beginning with a rewrite
of the sysfs detection code (using libsyfs). In the process, I replaced two
poorly named globals with better names, and moved them to sysfs.c. The sysfs
detection now happens very early during library init, rather than later.

The long term plan is for the two global variables to disappear anyway, as
everything to do with sysfs should get moved into lib/sysfs.c.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*
2     proc.h - Part of libsensors, a Linux library for reading sensor data.
3     Copyright (c) 1998, 1999  Frodo Looijaard <frodol@dds.nl>
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with this program; if not, write to the Free Software
17     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20 #ifndef SENSORS_LIB_PROC_H
21 #define SENSORS_LIB_PROC_H
22
23 /* Read /proc/sys/dev/sensors/chips */
24 extern int sensors_read_proc_chips(void);
25
26 /* Read /proc/bus/i2c */
27 extern int sensors_read_proc_bus(void);
28
29 /* Read a value out of a /proc file */
30 extern int sensors_read_proc(sensors_chip_name name, int feature,
31                              double *value);
32
33 /* Write a value to a /proc file */
34 extern int sensors_write_proc(sensors_chip_name name, int feature,
35                               double value);
36
37 #endif
Note: See TracBrowser for help on using the browser.