Bug 12006

Summary: [PATCH] hibernate-resume from swap file
Product: Busybox Reporter: Jordi Pujol <jordipujolp>
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs, jordipujolp, sven.mueller72+busybox
Priority: P3    
Version: 1.30.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: hibernate-resume from swap file
hibernate-resume from swap file
Updated patch (Now also removed superfluous parameter to /sys/power/resume)

Description Jordi Pujol 2019-07-05 06:44:10 UTC
Created attachment 8131 [details]
hibernate-resume from swap file

klibc-utils/resume.c
hibernate-resume from swap file.
- write offset in /sys/power/resume_offset according to the kernel's document uswsusp.txt
- Doing this the kernel will hibernate and resume successfully from a swap file.
Comment 1 Jordi Pujol 2019-07-13 07:26:32 UTC
Created attachment 8156 [details]
hibernate-resume from swap file

checking for "/sys/power/resume_offset", because oldest kernel versions doesn't have it
Comment 2 wmz 2021-01-16 09:18:00 UTC
I'm interested in how this patch is not adopted?
Comment 3 Sven Mueller 2021-03-19 08:24:46 UTC
Created attachment 8826 [details]
Updated patch (Now also removed superfluous parameter to /sys/power/resume)
Comment 4 Sven Mueller 2021-03-19 08:26:15 UTC
Upping Importance some.
This prevents people from using hibernation with a swap file and is fixed easily with the attached patch.
Comment 5 Denys Vlasenko 2021-03-20 13:03:10 UTC
Applied, thank you.
Comment 6 Jordi Pujol 2021-03-20 14:53:50 UTC
The additional parameter in /sys/power/resume is for compatibility with tuxonice on kernel 2.6. Modern kernel versions don't use this parameter.