函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:int swsusp_read(unsigned int *flags_p)

返回类型:int

参数:

类型参数名称
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  如果error小于PAGE_SIZE则返回:如果error小于0则error否则负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  如果error则转到:end
1489  如果非errorerror等于swap_read_page( & handle, header, NULL)
1491  如果非error
1492  error等于如果flags_p按位与SF_NOCOMPRESS_MODEload_image - load the image using the swap map handle*@handle and the snapshot handle @snapshot* (assume there are @nr_pages pages to load)否则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  如果非errorpr_debug("Image successfully loaded\n")
1500  否则pr_debug("Error %d resuming\n", error)
1502  返回:error
调用者
名称描述
load_image_and_restore