Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\hibernate.c Create Date:2022-07-28 09:59:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:/sys/power/disk - Control hibernation mode

Proto:static ssize_t disk_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)

Type:ssize_t

Parameter:

TypeParameterName
struct kobject *kobj
struct kobj_attribute *attr
char *buf
961  start = buf
963  If Not hibernation_available() Then Return sprintf(buf, "[disabled]\n")
966  When i <= HIBERNATION_MAX cycle
967  If Not hibernation_modes[i] Then Continue
970  Case i == HIBERNATION_SHUTDOWN
971  Case i == HIBERNATION_REBOOT
975  Case i == HIBERNATION_TEST_RESUME
976  Break
977  Case i == HIBERNATION_PLATFORM
978  If hibernation_ops Then Break
981  Continue
983  If i == hibernation_mode Then buf += sprintf(buf, "[%s] ", hibernation_modes[i])
985  Else buf += sprintf(buf, "%s ", hibernation_modes[i])
988  buf += sprintf(buf, "\n")
989  Return buf - start