All of lore.kernel.org
 help / color / mirror / Atom feed
* Should I return NOTIFY_DONE always from restart handler?
@ 2020-03-24 16:06 Tomek The Messenger
  2020-03-24 16:16 ` Pranay Srivastava
  0 siblings, 1 reply; 2+ messages in thread
From: Tomek The Messenger @ 2020-03-24 16:06 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 697 bytes --]

Hi
There is such struct as 'notifier_block'. It has member 'notifier_call'
where You assign pointer to your function (handler) and priority. Then You
register such notifier block to restart handler list.
Then when You type in linux reboot Your function might be invoked (depends
on priority you set and if You don't have registered arm_pm_restart
function which is typically done through device tree) .
My question is should I always return NOTIFY_DONE from my restart handler?
Or can I return some error code? In fact this doesn't make sense to return
any other code value as Your restart handler has to succeed always in order
not to halt system and not to do manually recovery by power off/on.

[-- Attachment #1.2: Type: text/html, Size: 779 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-24 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 16:06 Should I return NOTIFY_DONE always from restart handler? Tomek The Messenger
2020-03-24 16:16 ` Pranay Srivastava

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.