#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; } ' name='id' value='628f07d33c1f2e7bf31e0a4a988bb07914bd5e73'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEyal Itkin <eyal.itkin@gmail.com>2017-02-07 16:43:05 +0300
committerDoug Ledford <dledford@redhat.com>2017-02-08 12:28:30 -0500
commit628f07d33c1f2e7bf31e0a4a988bb07914bd5e73 (patch)
treec228c66498f9a4562093fbbf80a41bcede0c06f2 /net/hsr/Kconfig
parentb4cfe3971f6eab542dd7ecc398bfa1aeec889934 (diff)
IB/rxe: Fix resid update
Update the response's resid field when larger than MTU, instead of only updating the local resid variable. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'net/hsr/Kconfig')