• Patrick Mochel's avatar
    [Power Mgmt] Merge pmdisk and swsusp signature handling. · b6fb7271
    Patrick Mochel authored
    - Move struct pmdisk_header definition to swsusp and change name to struct
      swsusp_header.
    - Statically allocate one (swsusp_header), and use it during mark_swapfiles()
      and when checking sig on resume.
    - Move check_sig() from pmdisk to swsusp.
    - Wrap with swsusp_verify(), and move check_header() there. 
    - Fix up calls in pmdisk and swsusp.
    - Make new wrapper swsusp_close_swap() and call from write_suspend_image().
    - Look for swsusp_info info in swsusp_header.swsusp_info, instead of magic
      location at end of struct. 
    b6fb7271
swsusp.c 33.7 KB