Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 563544 Details for
Bug 677062
sys-auth/elogind-239.3 (with LVM) breaks hibernation - elogind-daemon: Failed to write hibernation disk offset: Invalid argument
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
this patch fixes the bug
fix.patch (text/plain), 1.23 KB, created by
Herbert Wantesh
on 2019-02-02 20:37:30 UTC
(
hide
)
Description:
this patch fixes the bug
Filename:
MIME Type:
Creator:
Herbert Wantesh
Created:
2019-02-02 20:37:30 UTC
Size:
1.23 KB
patch
obsolete
>diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c >index ca3befb30..125e3a4ac 100644 >--- a/src/sleep/sleep.c >+++ b/src/sleep/sleep.c >@@ -44,10 +44,16 @@ static int write_hibernate_location_info(void) { > if (r < 0) > return log_debug_errno(r, "Unable to find hibernation location: %m"); > >- /* if it's a swap partition, we just write the disk to /sys/power/resume */ >- if (streq(type, "partition")) >- return write_string_file("/sys/power/resume", device, 0); >- else if (!streq(type, "file")) >+ /* if it's a swap partition, we just write the disk to /sys/power/resume, convert it to major:minor id */ >+ if (streq(type, "partition")) { >+ if (stat( device, &stb) == -1) { >+ return log_debug_errno(EINVAL, "Error while trying to get stats for %s", >+ device); >+ } >+ char buffer [DECIMAL_STR_MAX(uint)*2+1]; >+ sprintf(buffer, "%u:%u",major(stb.st_rdev) , minor(stb.st_rdev) ); >+ return write_string_file("/sys/power/resume", buffer, 0); >+ }else if (!streq(type, "file")) > return log_debug_errno(EINVAL, "Invalid hibernate type %s: %m", > type); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 677062
: 563544 |
563760
|
563762
|
564618