diff -rNu smartbatt/Makefile smartbatt-2/Makefile --- smartbatt/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ smartbatt-2/Makefile 2005-01-03 17:25:49.346995193 +0000 @@ -0,0 +1,19 @@ +CC=gcc +CFLAGS=-I./include +DEPS=smartbattery.c +EFILE=smartbattery +I2C-ACPI-EC=i2c-acpi-ec/i2c-acpi-ec.ko + +default: $(EFILE) $(I2C-ACPI-EC) + +$(EFILE): $(DEPS) + @echo "linking $@ from $<" + $(CC) $(CFLAGS) -o $@ $< + +$(I2C-ACPI-EC): + make -C i2c-acpi-ec + +.PHONY: clean +clean: + rm -f smartbattery smartbattery.o + make -C i2c-acpi-ec clean diff -rNu smartbatt/i2c-acpi-ec/Makefile smartbatt-2/i2c-acpi-ec/Makefile --- smartbatt/i2c-acpi-ec/Makefile 2004-12-31 17:11:54.000000000 +0000 +++ smartbatt-2/i2c-acpi-ec/Makefile 2005-01-03 17:23:26.409880044 +0000 @@ -1 +1,17 @@ +ifneq ($(KERNELRELEASE),) obj-m := i2c-acpi-ec.o + +else +KDIR:= /lib/modules/$(shell uname -r)/build +PWD:= $(shell pwd) + +default: + $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules + +.PHONY: clean + +clean: + rm -f i2c-acpi-ec.ko i2c-acpi-ec.mod.* i2c-acpi-ec.o .i2c-acpi-ec.* + rm -rf .tmp_versions + +endif Files smartbatt/smartbattery and smartbatt-2/smartbattery differ diff -rNu smartbatt/smartbattery.c smartbatt-2/smartbattery.c --- smartbatt/smartbattery.c 2004-12-31 19:03:36.000000000 +0000 +++ smartbatt-2/smartbattery.c 2005-01-03 17:21:35.825490452 +0000 @@ -300,8 +300,8 @@ time_to_empty = i2c_smbus_read_word_data(file, 0x11); time_to_full = i2c_smbus_read_word_data(file, 0x11); - printf("current: %d mA\n", current & 0xffff); - printf("remain: %d mA or mWh\n", remain & 0xffff); + printf("current: %d mA\n", (current & 0xffff)); + printf("remain: %d mAh or mW\n", remain & 0xffff); printf("time to empty: %d minutes\n", time_to_empty & 0xffff); printf("time to full: %d minutes\n", time_to_full & 0xffff); printf("temperature: %2.1f C\n", ((temp & 0xffff) - 2730) / 10.);