Bug 32210 - Failed hooks do not inhibit pm-actions [PATCH]
Summary: Failed hooks do not inhibit pm-actions [PATCH]
Status: RESOLVED DUPLICATE of bug 40286
Alias: None
Product: pm-utils
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: All All
: medium major
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-07 20:02 UTC by ariel cornejo
Modified: 2016-08-17 18:07 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
patch for pm-functions.in (449 bytes, patch)
2010-12-07 20:02 UTC, ariel cornejo
Details | Splinter Review

Description ariel cornejo 2010-12-07 20:02:35 UTC
Created attachment 40891 [details] [review]
patch for pm-functions.in

Since 1.4.0, _run_hook calls a log() after running the hook, and thus loses the hook exit status:

199 	hook_ok "$1" && "$@"
200 	log ""
201 	log -n "$*: " 
202 	hook_exit_status $? && LAST_HOOK="${1##*/}" || inhibit 

I attached a simple patch that seems to fix it.

This is important because e.g. a script that unmounts SD/MMC cards before suspending cannot inhibit it if the card is busy (see https://help.ubuntu.com/community/AspireOne/Ubuntu9.10?action=recall&rev=69).

Regards,
  Ariel
Comment 1 ariel cornejo 2010-12-22 04:18:35 UTC
Umm, I hoped there would be some kind of reply by now. Should I learn git and try to submit the patch there?
Comment 2 /df 2016-08-17 18:07:59 UTC

*** This bug has been marked as a duplicate of bug 40286 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.