函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\swap.c Create Date:2022-07-27 11:03:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:swsusp_check - Check for swsusp signature in the resume device

函数原型:int swsusp_check(void)

返回类型:int

参数:

1513  hib_resume_bdev等于blkdev_get_by_dev(swsusp_resume_device, le is open for reading , NULL)
1515  如果非是错误
1516  set_blocksize(hib_resume_bdev, PAGE_SIZE)
1517  clear_page(swsusp_header)
1518  error等于hib_submit_io(REQ_OP_READ, 0, swsusp_resume_block, swsusp_header, NULL)
1521  如果error则转到:put
1524  如果非内存比较
1525  内存复制(sig, orig_sig, 10)
1530  否则
1531  error等于负EINVAL
1534  put :
1535  如果errorblkdev_put(hib_resume_bdev, le is open for reading )
1537  否则pr_debug("Image signature found, resuming\n")
1539  否则
1540  error等于错误
1543  如果errorpr_debug("Image not found (code %d)\n", error)
1546  返回:error
调用者
名称描述
software_resumesoftware_resume - Resume from a saved hibernation image.* This routine is called as a late initcall, when all devices have been* discovered and initialized already.* The image reading code is called to see if there is a hibernation image
hibernatehibernate - Carry out system hibernation, including saving the image.