Ifchd: Convert some tabs to spaces.
This commit is contained in:
parent
3640c5bbf0
commit
f78ea70d71
@ -125,7 +125,7 @@ static int set_if_flag(struct ifchd_client *cl, short flag)
|
|||||||
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
log_line("%s: (set_if_flag) failed to open interface socket: %s",
|
log_line("%s: (set_if_flag) failed to open interface socket: %s",
|
||||||
cl->ifnam, strerror(errno));
|
cl->ifnam, strerror(errno));
|
||||||
goto out0;
|
goto out0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,12 +177,12 @@ void perform_ip(struct ifchd_client *cl, const char *str, size_t len)
|
|||||||
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
log_line("%s: (perform_ip) failed to open interface socket: %s",
|
log_line("%s: (perform_ip) failed to open interface socket: %s",
|
||||||
cl->ifnam, strerror(errno));
|
cl->ifnam, strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ioctl(fd, SIOCSIFADDR, &ifrt) < 0)
|
if (ioctl(fd, SIOCSIFADDR, &ifrt) < 0)
|
||||||
log_line("%s: failed to configure IP: %s",
|
log_line("%s: failed to configure IP: %s",
|
||||||
cl->ifnam, strerror(errno));
|
cl->ifnam, strerror(errno));
|
||||||
else
|
else
|
||||||
log_line("Interface IP set to: '%s'", str);
|
log_line("Interface IP set to: '%s'", str);
|
||||||
close(fd);
|
close(fd);
|
||||||
@ -212,14 +212,14 @@ void perform_subnet(struct ifchd_client *cl, const char *str, size_t len)
|
|||||||
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
log_line("%s: (perform_ip) failed to open interface socket: %s",
|
log_line("%s: (perform_ip) failed to open interface socket: %s",
|
||||||
cl->ifnam, strerror(errno));
|
cl->ifnam, strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ioctl(fd, SIOCSIFNETMASK, &ifrt) < 0) {
|
if (ioctl(fd, SIOCSIFNETMASK, &ifrt) < 0) {
|
||||||
sin.sin_addr.s_addr = 0xffffffff;
|
sin.sin_addr.s_addr = 0xffffffff;
|
||||||
if (ioctl(fd, SIOCSIFNETMASK, &ifrt) < 0)
|
if (ioctl(fd, SIOCSIFNETMASK, &ifrt) < 0)
|
||||||
log_line("%s: failed to configure subnet: %s",
|
log_line("%s: failed to configure subnet: %s",
|
||||||
cl->ifnam, strerror(errno));
|
cl->ifnam, strerror(errno));
|
||||||
} else
|
} else
|
||||||
log_line("Interface subnet set to: '%s'", str);
|
log_line("Interface subnet set to: '%s'", str);
|
||||||
close(fd);
|
close(fd);
|
||||||
@ -260,7 +260,7 @@ void perform_router(struct ifchd_client *cl, const char *str, size_t len)
|
|||||||
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
log_line("%s: (perform_router) failed to open interface socket: %s",
|
log_line("%s: (perform_router) failed to open interface socket: %s",
|
||||||
cl->ifnam, strerror(errno));
|
cl->ifnam, strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ioctl(fd, SIOCADDRT, &rt)) {
|
if (ioctl(fd, SIOCADDRT, &rt)) {
|
||||||
@ -293,12 +293,12 @@ void perform_mtu(struct ifchd_client *cl, const char *str, size_t len)
|
|||||||
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
log_line("%s: (perform_mtu) failed to open interface socket: %s",
|
log_line("%s: (perform_mtu) failed to open interface socket: %s",
|
||||||
cl->ifnam, strerror(errno));
|
cl->ifnam, strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ioctl(fd, SIOCSIFMTU, &ifrt) < 0)
|
if (ioctl(fd, SIOCSIFMTU, &ifrt) < 0)
|
||||||
log_line("%s: failed to set MTU (%d): %s", cl->ifnam, mtu,
|
log_line("%s: failed to set MTU (%d): %s", cl->ifnam, mtu,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
else
|
else
|
||||||
log_line("MTU set to: '%s'", str);
|
log_line("MTU set to: '%s'", str);
|
||||||
close(fd);
|
close(fd);
|
||||||
@ -331,7 +331,7 @@ void perform_broadcast(struct ifchd_client *cl, const char *str, size_t len)
|
|||||||
}
|
}
|
||||||
if (ioctl(fd, SIOCSIFBRDADDR, &ifrt) < 0)
|
if (ioctl(fd, SIOCSIFBRDADDR, &ifrt) < 0)
|
||||||
log_line("%s: failed to set broadcast: %s",
|
log_line("%s: failed to set broadcast: %s",
|
||||||
cl->ifnam, strerror(errno));
|
cl->ifnam, strerror(errno));
|
||||||
else
|
else
|
||||||
log_line("Broadcast address set to: '%s'", str);
|
log_line("Broadcast address set to: '%s'", str);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user