Re: first shoot for smartbattery (was Re: Re: i2c-acpi-ec.c)

François Valenduc
2004-12-31T18:48:53Z

Hello,

Since I own a ACER Travelmate 4001 which has a smartbattery, I tried
this driver. Everythings works well until I try to compile
smartbattery.c. If I launch the gcc command like explained in the README
file, here is what I get:

gcc -W -Wall -O2 -o smartbattery smartbattery.c
smartbattery.c: Dans la fonction « main »:
smartbattery.c:274: attention : implicit declaration of function `ioctl'
smartbattery.c:274: error: `I2C_FUNCS' undeclared (first use in this
function)
smartbattery.c:274: error: (Each undeclared identifier is reported only once
smartbattery.c:274: error: for each function it appears in.)
smartbattery.c:280: error: `I2C_FUNC_SMBUS_READ_WORD_DATA' undeclared
(first use in this function)
smartbattery.c:290: error: `I2C_SLAVE_FORCE' undeclared (first use in
this function)
smartbattery.c:296: attention : implicit declaration of function
`i2c_smbus_read_word_data'
zsh: exit 1 gcc -W -Wall -O2 -o smartbattery smartbattery.c
19:42 root@ordi-francois /home/francois/Noyau/smartbatt# ls
acpi-ec-2.6.10.diff i2c-acpi-ec/ README smartbattery.c
19:42 root@ordi-francois /home/francois/Noyau/smartbatt# gcc -W -Wall
-O2 -o smartbattery smartbattery.c
smartbattery.c: Dans la fonction « main »:
smartbattery.c:274: attention : implicit declaration of function `ioctl'
smartbattery.c:274: error: `I2C_FUNCS' undeclared (first use in this
function)
smartbattery.c:274: error: (Each undeclared identifier is reported only once
smartbattery.c:274: error: for each function it appears in.)
smartbattery.c:280: error: `I2C_FUNC_SMBUS_READ_WORD_DATA' undeclared
(first use in this function)
smartbattery.c:290: error: `I2C_SLAVE_FORCE' undeclared (first use in
this function)
smartbattery.c:296: attention : implicit declaration of function
`i2c_smbus_read_word_data'
zsh: exit 1 gcc -W -Wall -O2 -o smartbattery smartbattery.c

Nevertheless, Thanks very much for your help in supporting
smartbatteries and off course, happy new year !

Bruno Ducrot a écrit :

>On Fri, Dec 31, 2004 at 04:07:24PM +0100, Bruno Ducrot wrote:
>
>
>>I'm polishing i2c-acpi-ec right now. Stay tunned.
>>
>>
>
>It's not yet really polished as I wanted, but well I don't have
>time to finish this due to, huh, ..., private stuff this night.
>
>its should give people rough idea what will happens.
>
>You can find this at http://www.poupinou.org/acpi/smartbatt/
>Take one of the smartbatt.tar.{gz,bz2} and follow the README after
>unpacking it, and hopefully a ./smartbatt will give you correct battery
>informations (who knows).
>
>happy new year!