Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:swsusp_read - read the hibernation image.*@flags_p: flags passed by the "frozen" kernel in the image header should* be written into this memory location

Proto:int swsusp_read(unsigned int *flags_p)

Type:int

Parameter:

TypeParameterName
unsigned int *flags_p
1481  memset( & snapshot, 0, sizeof(structsnapshot_handle))
1482  error = snapshot_write_next - Get the address to store the next image page.*@handle: Snapshot handle structure to guide the writing.* On the first call, @handle should point to a zeroed snapshot_handle* structure
1483  If error < PAGE_SIZE Then Return If error < 0 Then error Else -EFAULT
1485  header = This macro returns the address from/to which the caller of* snapshot_read_next()/snapshot_write_next() is allowed to* read/write data after the function returns(snapshot)
1486  error = get_swap_reader( & handle, flags_p)
1487  If error Then Go to end
1489  If Not error Then error = swap_read_page( & handle, header, NULL)
1491  If Not error Then
1492  error = If flags_p & SF_NOCOMPRESS_MODE Then load_image - load the image using the swap map handle*@handle and the snapshot handle @snapshot* (assume there are @nr_pages pages to load) Else load_image_lzo - Load compressed image data and decompress them with LZO.*@handle: Swap map handle to use for loading data.*@snapshot: Image to copy uncompressed data into.*@nr_to_read: Number of pages to load.
1496  swap_reader_finish( & handle)
1497  end :
1498  If Not error Then pr_debug("Image successfully loaded\n")
1500  Else pr_debug("Error %d resuming\n", error)
1502  Return error