#include #include #include "str.h" #include "proc.h" #include "xmalloc.h" static size_t argv_len(char *const argv[]) { size_t len = 0; for (; argv && *argv; argv++) len++; return len; } int cpp_exec(char *in_file, char *out_file, size_t out_len, char *const argv[]) { size_t argc = 7 + argv_len(argv); char *tmp = xstrdup(in_file); char **cpp_argv; int ret = 0; char *base; unsigned int i = 0; base = basename(tmp); slprintf(out_file, out_len, "/tmp/.tmp-%u-%s", rand(), base); cpp_argv = xmalloc(argc * sizeof(char *)); cpp_argv[i++] = "cpp"; for (; argv && *argv; argv++, i++) cpp_argv[i] = *argv; cpp_argv[i++] = "-I"; cpp_argv[i++] = ETCDIRE_STRING; cpp_argv[i++] = "-o"; cpp_argv[i++] = out_file; cpp_argv[i++] = in_file; cpp_argv[i++] = NULL; if (proc_exec("cpp", cpp_argv)) ret = -1; xfree(cpp_argv); xfree(tmp); return ret; } net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoffer Dall <christoffer.dall@linaro.org>2016-06-04 15:41:00 +0100
committerChristoffer Dall <christoffer.dall@linaro.org>2016-05-20 15:39:39 +0200
commitb452cb52072d21f026e38ac7af36a969bab2ed22 (patch)
tree49cf39fe6636b87c2c206adfcac3759ddf621dcc
parent63306c28ac92bdf9e41aef367708d762f9f725f2 (diff)
KVM: arm/arm64: Remove the IRQ field from struct irq_phys_map
The communication of a Linux IRQ number from outside the VGIC to the vgic was a leftover from the day when the vgic code cared about how a particular device injects virtual interrupts mapped to a physical interrupt. We can safely remove this notion, leaving all physical IRQ handling to be done in the device driver (the arch timer in this case), which makes room for a saner API for the new VGIC. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org>