Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:swsusp_check - Check for swsusp signature in the resume device

Proto:int swsusp_check(void)

Type:int

Parameter:Nothing

1513  hib_resume_bdev = blkdev_get_by_dev(swsusp_resume_device, le is open for reading , NULL)
1515  If Not IS_ERR(hib_resume_bdev) Then
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  If error Then Go to put
1524  If Not memcmp(HIBERNATE_SIG, sig, 10) Then
1525  No 3D Now!(sig, orig_sig, 10)
1530  Else
1531  error = -EINVAL
1534  put :
1535  If error Then blkdev_put(hib_resume_bdev, le is open for reading )
1537  Else pr_debug("Image signature found, resuming\n")
1539  Else
1540  error = PTR_ERR(hib_resume_bdev)
1543  If error Then pr_debug("Image not found (code %d)\n", error)
1546  Return error
Caller
NameDescribe
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