Lines Matching refs:status

226                                   struct battery_status *status)  in set_attribute_battery_status()  argument
232 status->state = 0; in set_attribute_battery_status()
234 status->state = 1; in set_attribute_battery_status()
240 status->present_rate = strtoull(attrib_value, NULL, 10); in set_attribute_battery_status()
246 status->remaining_capacity = strtoull(attrib_value, NULL, 10); in set_attribute_battery_status()
252 status->present_voltage = strtoull(attrib_value, NULL, 10); in set_attribute_battery_status()
259 status->present = YES; in set_attribute_battery_status()
414 void print_battery_status(struct battery_status *status) in print_battery_status() argument
416 printf("present: %d\n", status->present); in print_battery_status()
417 printf("Battery state %d\n", status->state); in print_battery_status()
418 printf("Battery present rate %d\n", status->present_rate); in print_battery_status()
419 printf("Battery remining capacity %d\n", status->remaining_capacity); in print_battery_status()
420 printf("Battery present voltage %d\n", status->present_voltage); in print_battery_status()
424 void write_battery_status_to_xenstore(struct battery_status *status) in write_battery_status_to_xenstore() argument
432 write_ulong_lsb_first(val+2, status->state); in write_battery_status_to_xenstore()
433 write_ulong_lsb_first(val+10, status->present_rate); in write_battery_status_to_xenstore()
434 write_ulong_lsb_first(val+18, status->remaining_capacity); in write_battery_status_to_xenstore()
435 write_ulong_lsb_first(val+26, status->present_voltage); in write_battery_status_to_xenstore()
445 struct battery_status status; in wait_for_and_update_battery_status_request() local
456 while ( get_next_battery_info_or_status(dir, BST, (void *)&status) ) in wait_for_and_update_battery_status_request()
459 print_battery_status(&status); in wait_for_and_update_battery_status_request()
461 if ( status.present == YES ) in wait_for_and_update_battery_status_request()
463 write_battery_status_to_xenstore(&status); in wait_for_and_update_battery_status_request()