Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apm_32.c Create Date:2022-07-28 08:22:36
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:proc_apm_show

Proto:static int proc_apm_show(struct seq_file *m, void *v)

Type:int

Parameter:

TypeParameterName
struct seq_file *m
void *v
1641  ac_line_status = 0xff
1642  battery_status = 0xff
1643  battery_flag = 0xff
1644  percentage = -1
1645  time_units = -1
1646  units = "?"
1648  If num_online_cpus() == 1 && Not (error = apm_get_power_status - get current power state*@status: returned status*@bat: battery info*@life: estimated life* Obtain the current power status from the APM BIOS. We return a* status which gives the rough battery status, and current power* source) Then
1650  ac_line_status = bx >> 8 & 0xff
1651  battery_status = bx & 0xff
1652  If (cx & 0xff) != 0xff Then percentage = cx & 0xff
1655  If connection_version > 0x100 Then
1656  battery_flag = cx >> 8 & 0xff
1657  If dx != 0xffff Then
1658  units = If dx & 0x8000 Then "min" Else "sec"
1659  time_units = dx & 0x7fff
1701  seq_printf(m, "%s %d.%d 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n", spaces , (version >> 8) & 0xff, version & 0xff, flags, ac_line_status, battery_status, battery_flag, percentage, time_units, units)
1712  Return 0