#include #include #include "cpp.h" #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; } 'hidden' name='id' value='8ec4b736d709562193566156c0dd40e327df2cbb'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-29 08:10:03 -0200
committerDarren Hart <dvhart@linux.intel.com>2016-11-01 09:27:33 -0700
commit8ec4b736d709562193566156c0dd40e327df2cbb (patch)
treea9b125f2cf365b34f29a9ee0bb79a9088a5e5730
parent1c80e9603fe8341ed5bea696747d07083d5e0476 (diff)
Documentation/ABI: ibm_rtl: The "What:" fields are incomplete
The "What:" field at the ABI should describe the location of the ABI, e. g. the position under a mounted sysfs. However, this file has only the basename without the path. Fix it. Cc: Vernon Mauery <vernux@us.ibm.com> Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>