#include #include "strbuf.h" #include "quote.h" #include "util.h" /* Help to copy the thing properly quoted for the shell safety. * any single quote is replaced with '\'', any exclamation point * is replaced with '\!', and the whole thing is enclosed in a * * E.g. * original sq_quote result * name ==> name ==> 'name' * a b ==> a b ==> 'a b' * a'b ==> a'\''b ==> 'a'\''b' * a!b ==> a'\!'b ==> 'a'\!'b' */ static inline int need_bs_quote(char c) { return (c == '\'' || c == '!'); } static int sq_quote_buf(struct strbuf *dst, const char *src) { char *to_free = NULL; int ret; if (dst->buf == src) to_free = strbuf_detach(dst, NULL); ret = strbuf_addch(dst, '\''); while (!ret && *src) { size_t len = strcspn(src, "'!"); ret = strbuf_add(dst, src, len); src += len; while (!ret && need_bs_quote(*src)) ret = strbuf_addf(dst, "'\\%c\'", *src++); } if (!ret) ret = strbuf_addch(dst, '\''); free(to_free); return ret; } int sq_quote_argv(struct strbuf *dst, const char** argv, size_t maxlen) { int i, ret; /* Copy into destination buffer. */ ret = strbuf_grow(dst, 255); for (i = 0; !ret && argv[i]; ++i) { ret = strbuf_addch(dst, ' '); if (ret) break; ret = sq_quote_buf(dst, argv[i]); if (maxlen && dst->len > maxlen) return -ENOSPC; } return ret; } it' value='switch'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/include/uapi/misc/Kbuild
diff options
context:
space:
mode:
authorRuslan Ruslichenko <rruslich@cisco.com>2017-01-17 16:13:52 +0200
committerThomas Gleixner <tglx@linutronix.de>2017-01-18 15:37:28 +0100
commit020eb3daaba2857b32c4cf4c82f503d6a00a67de (patch)
tree329a05b424d783db675a4c711bd7633575e8181b /include/uapi/misc/Kbuild
parent49def1853334396f948dcb4cedb9347abb318df5 (diff)
x86/ioapic: Restore IO-APIC irq_chip retrigger callback
commit d32932d02e18 removed the irq_retrigger callback from the IO-APIC chip and did not add it to the new IO-APIC-IR irq chip. Unfortunately the software resend fallback is not enabled on X86, so edge interrupts which are received during the lazy disabled state of the interrupt line are not retriggered and therefor lost. Restore the callbacks. [ tglx: Massaged changelog ] Fixes: d32932d02e18 ("x86/irq: Convert IOAPIC to use hierarchical irqdomain interfaces") Signed-off-by: Ruslan Ruslichenko <rruslich@cisco.com> Cc: xe-linux-external@cisco.com Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1484662432-13580-1-git-send-email-rruslich@cisco.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/uapi/misc/Kbuild')