Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 176757 | Differences between
and this patch

Collapse All | Expand All

(-)gnome-applets-2.16.2-orig/battstat/acpi-linux.c (-14 / +13 lines)
Lines 200-221 Link Here
200
  acpiinfo->max_capacity = 0;
200
  acpiinfo->max_capacity = 0;
201
  acpiinfo->low_capacity = 0;
201
  acpiinfo->low_capacity = 0;
202
  acpiinfo->critical_capacity = 0;
202
  acpiinfo->critical_capacity = 0;
203
  acpiinfo->ac_state_state = "state";
204
  acpiinfo->batt_state_state = "state";
205
  acpiinfo->charging_state = "charging state";
203
206
204
  hash = read_file ("/proc/acpi/info", buf, sizeof (buf));
207
  hash = read_file ("/proc/acpi/info", buf, sizeof (buf));
205
  if (!hash)
208
  if (hash)
206
    return FALSE;
209
  {
207
210
	  acpi_ver = read_ulong (hash, "version");
208
  acpi_ver = read_ulong (hash, "version");
211
	  g_hash_table_destroy (hash);
209
  g_hash_table_destroy (hash);
212
210
213
	  if (acpi_ver < (gulong)20020208) {
211
  if (acpi_ver < (gulong)20020208) {
214
		  acpiinfo->ac_state_state = "status";
212
    acpiinfo->ac_state_state = "status";
215
		  acpiinfo->batt_state_state = "status";
213
    acpiinfo->batt_state_state = "status";
216
		  acpiinfo->charging_state = "state";
214
    acpiinfo->charging_state = "state";
217
	  }
215
  } else {
216
    acpiinfo->ac_state_state = "state";
217
    acpiinfo->batt_state_state = "state";
218
    acpiinfo->charging_state = "charging state";
219
  }
218
  }
220
219
221
  procdir=opendir("/proc/acpi/battery/");
220
  procdir=opendir("/proc/acpi/battery/");

Return to bug 176757