From ab91aee4b0b5a8fa7bef078ffe84342bc17830b2 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 13 Dec 2016 10:43:24 -0800 Subject: [PATCH] ipvrf: cleanup style issues Signed-off-by: Stephen Hemminger --- ip/ipvrf.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ip/ipvrf.c b/ip/ipvrf.c index d49af7744..4d5984541 100644 --- a/ip/ipvrf.c +++ b/ip/ipvrf.c @@ -117,7 +117,8 @@ static int ipvrf_pids(int argc, char **argv) n = read(fd, buf, sizeof(buf) - 1); if (n < 0) { fprintf(stderr, - "Failed to read cgroups file: %s\n", strerror(errno)); + "Failed to read cgroups file: %s\n", + strerror(errno)); break; } else if (n == 0) { rc = 0; @@ -139,8 +140,10 @@ static int prog_load(int idx) struct bpf_insn prog[] = { BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), BPF_MOV64_IMM(BPF_REG_3, idx), - BPF_MOV64_IMM(BPF_REG_2, offsetof(struct bpf_sock, bound_dev_if)), - BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_3, offsetof(struct bpf_sock, bound_dev_if)), + BPF_MOV64_IMM(BPF_REG_2, + offsetof(struct bpf_sock, bound_dev_if)), + BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_3, + offsetof(struct bpf_sock, bound_dev_if)), BPF_MOV64_IMM(BPF_REG_0, 1), /* r0 = verdict */ BPF_EXIT_INSN(), }; @@ -155,7 +158,9 @@ static int vrf_configure_cgroup(const char *path, int ifindex) cg_fd = open(path, O_DIRECTORY | O_RDONLY); if (cg_fd < 0) { - fprintf(stderr, "Failed to open cgroup path: '%s'\n", strerror(errno)); + fprintf(stderr, + "Failed to open cgroup path: '%s'\n", + strerror(errno)); goto out; } @@ -172,7 +177,7 @@ static int vrf_configure_cgroup(const char *path, int ifindex) if (bpf_prog_attach_fd(prog_fd, cg_fd, BPF_CGROUP_INET_SOCK_CREATE)) { fprintf(stderr, "Failed to attach prog to cgroup: '%s'\n", strerror(errno)); - fprintf(stderr, "Kernel compiled with CGROUP_BPF enabled?\n"); + fprintf(stderr, "Kernel compiled with CGROUP_BPF enabled?\n"); goto out; } -- 2.47.2