Skip to content
Commit cb31ef48 authored by Chen Yu's avatar Chen Yu Committed by Mike Snitzer
Browse files

init: fix regression by supporting devices with major:minor:offset format

Commit 283e7ad0 ("init: stricter checking of major:minor root=
values") was so strict that it exposed the fact that a previously
unknown device format was being used.

Distributions like Ubuntu uses klibc (rather than uswsusp) to resume
system from hibernation.  klibc expressed the swap partition/file in
the form of major:minor:offset.  For example, 8:3:0 represents a swap
partition in klibc, and klibc's resume process in initrd will finally
echo 8:3:0 to /sys/power/resume for manually resuming.  However, due
to commit 283e7ad0

's stricter checking, 8:3:0 will be treated as an
invalid device format, and manual resuming from hibernation will fail.

Fix this by adding support for devices with major:minor:offset format
when resuming from hibernation.

Reported-by: default avatarPrigent, Christophe <christophe.prigent@intel.com>
Signed-off-by: default avatarChen Yu <yu.c.chen@intel.com>
Acked-by: default avatarRafael J. Wysocki <rjw@rjwysocki.net>
Signed-off-by: Mike Snitzer <...
parent c0403ec0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment