Skip to contentSkip to conversation

Report errors in fan.c

PATCH Pavel Machek 1 participant 1 message Oct 4, 2004 ACPI

lore
Share & tools
lore
#0 lore raw

Hi!

Currently, fan.c ignores errors from acpi_bus_get_power. On compaq evo notebook that leads to very confusing empty output. Please apply,

Pavel

drivers/acpi/fan.c renamed from linux/drivers/acpi/fan.c +4 -4
@@ -94,10 +94,10 @@
 		goto end;
 
 	if (acpi_bus_get_power(fan->handle, &state))
-		goto end;
-
-	p += sprintf(p, "status:                  %s\n",
-		!state?"on":"off");
+		p += sprintf(p, "status:                  ERROR\n");
+	else
+		p += sprintf(p, "status:                  %s\n",
+			     !state?"on":"off");
 
 end:
 	len = (p - page);
Signature · 9 lines
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl