Latest cvs -> Compile Errors
Hi there,
if I try to compile latest cvs version, then i got errors :
gcc -I. -Ikernel/include -I/usr/local/include -I/lib/modules/2.4.19/build/include -O2 -c prog/sensors/chips.c -o prog/sensors/chips.roprog/sensors/chips.c: In function `print_bmc':prog/sensors/chips.c:3669: `SENSORS_BMC_IN1' undeclared (first use in this function) prog/sensors/chips.c:3669: (Each undeclared identifier is reported only once prog/sensors/chips.c:3669: for each function it appears in.) prog/sensors/chips.c:3671: SENSORS_BMC_IN1_MIN' undeclared (first use in this function) prog/sensors/chips.c:3672: SENSORS_BMC_IN1_MAX' undeclared (first use in this function) prog/sensors/chips.c:3683: SENSORS_BMC_FAN1' undeclared (first use in this function) prog/sensors/chips.c:3688: SENSORS_BMC_FAN1_MIN' undeclared (first use in this function) prog/sensors/chips.c:3699: SENSORS_BMC_TEMP1' undeclared (first use in this function) prog/sensors/chips.c:3701: SENSORS_BMC_TEMP1_MIN' undeclared (first use in this function) prog/sensors/chips.c:3702: `SENSORS_BMC_TEMP1_MAX' undeclared (first use in this function)
make: *** [prog/sensors/chips.ro] Fehler 1
What going wrong ?
Mark, I believe you have forgot some defines ?
Signature · 2 lines
Thanks, Alexander Malysh
(Resending again, looks like there were problems with stimpy yesterday evening and still this morning.)
Quoted 1 line
Khali, this probably breaks your doc-features tool.
It did, and I workaround it. I don't know how we can generate a doc for bmcsensors since it has some kind of dynamic allocation for the ctl_table, if I understand it well. I tool a look at the code and I couldn't see how the proc names will be generated. It seems that bmcsensors_proc_name_pool is used uninitialized (or is there something I don't know about kmalloc?) I'd appreciate some explanations, for my personal knowledge if not to find a way to generate the doc.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
thanks. I just checked in lib/chips.[ch].
I was stalling because I was trying to figure out how to do a dynamic sensors_chip_feature table in libsensors. But I don't think it's possible.
Khali, this probably breaks your doc-features tool.
But I don't know how many of each kind of sensor BMC will find. I was hoping to just define the first one of each kind in chips.h but then I realized I had to put the max number into the table in chips.c anyway. What a pain. If anybody has any ideas let me know.
Dynamic sensor discovery is one of two hard parts of doing IPMI.
The other was defining a new dummy adapter, then realizing libsensors didn't support dummy adapters other than isa. There's a couple of hacks in there for that but generic support for dummy adapters will require more code.
mds
Quoted 25 lines · Alexander Malysh
Hi there,
if I try to compile latest cvs version, then i got errors :
gcc -I. -Ikernel/include -I/usr/local/include -I/lib/modules/2.4.19/build/include -O2 -c
prog/sensors/chips.c-o prog/sensors/chips.roprog/sensors/chips.c: In function `print_bmc':prog/sensors/chips.c:3669: `SENSORS_BMC_IN1' undeclared (first use in this function)prog/sensors/chips.c:3669: (Each undeclared identifier is reported only onceprog/sensors/chips.c:3669: for each function it appears in.)prog/sensors/chips.c:3671:SENSORS_BMC_IN1_MIN' undeclared (first use in this function) prog/sensors/chips.c:3672:SENSORS_BMC_IN1_MAX' undeclared (first use in this function)prog/sensors/chips.c:3683:SENSORS_BMC_FAN1' undeclared (first use in this function) prog/sensors/chips.c:3688:SENSORS_BMC_FAN1_MIN' undeclared (first use in this function)prog/sensors/chips.c:3699:SENSORS_BMC_TEMP1' undeclared (first use in this function) prog/sensors/chips.c:3701:SENSORS_BMC_TEMP1_MIN' undeclared (first use in this function)prog/sensors/chips.c:3702: `SENSORS_BMC_TEMP1_MAX' undeclared (first use in this function)
make: *** [prog/sensors/chips.ro] Fehler 1What going wrong ?
Mark, I believe you have forgot some defines ?--
Thanks,
Alexander Malysh
Quoted 4 lines · Jean Delvare
(Resending again, looks like there were problems with stimpy yesterday evening and still this morning.)
Quoted 8 lines
Quoted 1 line
Khali, this probably breaks your doc-features tool.
It did, and I workaround it. I don't know how we can generate a doc for bmcsensors since it has some kind of dynamic allocation for the
ctl_table, if I understand it well. I tool a look at the code and I couldn't see how the proc names will be generated. It seems thatbmcsensors_proc_name_poolis used uninitialized (or is there something I don't know about kmalloc?) I'd appreciate some explanations, for my personal knowledge if not to find a way to generate the doc.
The bmcsensors module queries the BMC (onboard controller), via the IPMI protocol,
for SDR's (sensor data records).
It looks for 4 types of sensors: temperature, voltage, current, and fan. Then it kmallocs a /proc table (bmcsensors_dir_table) and some extra space
to generate and store the /proc names (bmcsensors_proc_name_pool). It generates the /proc names according to the sensor type, starting with 1.
(e.g. in1, in2, in3, temp1, temp2, fan1, fan2, fan3, fan4). Then it registers bmcsensors_dir_table in the usual manner.
So the bmcsensors module doesn't have any limit on the number of each type of sensor.
The limit is in lib/chips.c, where there's no way to do a dynamic struct sensors_chip_feature bmcsensors[]? So we have to fill that struct with the max expected of each sensor type.
Since it's static, there's really no reason to have x+1, x+2, ... SYSCTL definitions. We might as well just go back to the old way.