#ifndef DIE_H #define DIE_H #include #include #include #include #include #include #include #include #include "built_in.h" static inline void panic(const char *format, ...) __check_format_printf(1, 2); static inline void syslog_panic(const char *format, ...) __check_format_printf(1, 2); static inline void syslog_maybe(bool cond, int priority, const char *format, ...) __check_format_printf(3, 4); static inline void __noreturn __die_hard(void) { exit(EXIT_FAILURE); } static inline void __noreturn __die_harder(void) { _exit(EXIT_FAILURE); } static inline void __noreturn die(void) { __die_hard(); } static inline void __noreturn _die(void) { __die_harder(); } static inline void __noreturn panic(const char *format, ...) { va_list vl; va_start(vl, format); vfprintf(stderr, format, vl); va_end(vl); die(); } static inline void __noreturn syslog_panic(const char *format, ...) { va_list vl; va_start(vl, format); vsyslog(LOG_ERR, format, vl); va_end(vl); die(); } static inline void syslog_maybe(bool cond, int priority, const char *format, ...) { if (cond) { va_list vl; va_start(vl, format); vsyslog(priority, format, vl); va_end(vl); } } #endif /* DIE_H */ oop-back'>packet-loop-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2016-07-21 18:09:34 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2016-07-21 18:54:11 -0700
commitf5c93dea8fb7daf5ec26176caa791719895cd28e (patch)
treea73192ae36861f5312bf72264b7c520e8c754016 /drivers/staging/greybus
parent2358024b67fccc07b95c5d8e637927acdb8e30fa (diff)
greybus: pm: add error handling to bundle activation
The firmware now keeps the underlying hardware disabled until receiving the first Bundle Activate request. Additionally: requesting transition to a state the bundle is already in is no longer an error. We can now add proper error handling to the bundle activate call. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus')