whitespace fixes. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -214,7 +214,7 @@ static int arp_del(char **args)
|
||||
|
||||
/* Get the hardware address to a specified interface name */
|
||||
static void arp_getdevhw(char *ifname, struct sockaddr *sa,
|
||||
const struct hwtype *hwt)
|
||||
const struct hwtype *hwt)
|
||||
{
|
||||
struct ifreq ifr;
|
||||
const struct hwtype *xhw;
|
||||
@@ -233,8 +233,8 @@ static void arp_getdevhw(char *ifname, struct sockaddr *sa,
|
||||
xhw = get_hwntype(-1);
|
||||
}
|
||||
bb_error_msg("device '%s' has HW address %s '%s'",
|
||||
ifname, xhw->name,
|
||||
xhw->print((unsigned char *) &ifr.ifr_hwaddr.sa_data));
|
||||
ifname, xhw->name,
|
||||
xhw->print((unsigned char *) &ifr.ifr_hwaddr.sa_data));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ static int arp_set(char **args)
|
||||
/* Print the contents of an ARP request block. */
|
||||
static void
|
||||
arp_disp(const char *name, char *ip, int type, int arp_flags,
|
||||
char *hwa, char *mask, char *dev)
|
||||
char *hwa, char *mask, char *dev)
|
||||
{
|
||||
static const int arp_masks[] = {
|
||||
ATF_PERM, ATF_PUBL,
|
||||
@@ -428,7 +428,7 @@ static int arp_show(char *name)
|
||||
/* All these strings can't overflow
|
||||
* because fgets above reads limited amount of data */
|
||||
num = sscanf(line, "%s 0x%x 0x%x %s %s %s\n",
|
||||
ip, &type, &flags, hwa, mask, dev);
|
||||
ip, &type, &flags, hwa, mask, dev);
|
||||
if (num < 4)
|
||||
break;
|
||||
|
||||
@@ -461,7 +461,7 @@ static int arp_show(char *name)
|
||||
}
|
||||
if (option_mask32 & ARP_OPT_v)
|
||||
printf("Entries: %d\tSkipped: %d\tFound: %d\n",
|
||||
entries, entries - shown, shown);
|
||||
entries, entries - shown, shown);
|
||||
|
||||
if (!shown) {
|
||||
if (hw_set || host || device[0])
|
||||
@@ -517,7 +517,7 @@ int arp_main(int argc UNUSED_PARAM, char **argv)
|
||||
|
||||
if (hw->alen <= 0) {
|
||||
bb_error_msg_and_die("%s: %s without ARP support",
|
||||
hw->name, "hardware type");
|
||||
hw->name, "hardware type");
|
||||
}
|
||||
|
||||
/* Now see what we have to do here... */
|
||||
|
||||
@@ -238,9 +238,9 @@ int ether_wake_main(int argc UNUSED_PARAM, char **argv)
|
||||
{
|
||||
unsigned char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data;
|
||||
printf("The hardware address (SIOCGIFHWADDR) of %s is type %d "
|
||||
"%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n\n", ifname,
|
||||
if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1],
|
||||
hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]);
|
||||
"%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n\n", ifname,
|
||||
if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1],
|
||||
hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
@@ -796,9 +796,9 @@ static void parse_conf(const char *path, int flag)
|
||||
/* the line is not recognized */
|
||||
config_error:
|
||||
bb_error_msg("config error '%s' in '%s'", buf, filename);
|
||||
} /* while (fgets) */
|
||||
} /* while (fgets) */
|
||||
|
||||
fclose(f);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
#if ENABLE_FEATURE_HTTPD_ENCODE_URL_STR
|
||||
@@ -1708,7 +1708,7 @@ static int pam_talker(int num_msg,
|
||||
case PAM_PROMPT_ECHO_OFF:
|
||||
s = userinfo->pw;
|
||||
break;
|
||||
case PAM_ERROR_MSG:
|
||||
case PAM_ERROR_MSG:
|
||||
case PAM_TEXT_INFO:
|
||||
s = "";
|
||||
break;
|
||||
|
||||
@@ -133,7 +133,7 @@ static void process_includes(const char *filename)
|
||||
process_includes(include_directive);
|
||||
|
||||
/* Print everything after directive */
|
||||
if (end) {
|
||||
if (end) {
|
||||
fputs(end, stdout);
|
||||
free(end);
|
||||
}
|
||||
|
||||
@@ -449,7 +449,7 @@ int ifconfig_main(int argc UNUSED_PARAM, char **argv)
|
||||
}
|
||||
#endif
|
||||
memcpy( (((char *)&ifr) + a1op->ifr_offset),
|
||||
p, sizeof(struct sockaddr));
|
||||
p, sizeof(struct sockaddr));
|
||||
} else {
|
||||
/* FIXME: error check?? */
|
||||
unsigned long i = strtoul(*argv, NULL, 0);
|
||||
|
||||
@@ -950,8 +950,8 @@ static void ife_print6(struct interface *ptr)
|
||||
(struct sockaddr *) &sap.sin6_addr);
|
||||
sap.sin6_family = AF_INET6;
|
||||
printf(" inet6 addr: %s/%d",
|
||||
INET6_sprint((struct sockaddr *) &sap, 1),
|
||||
plen);
|
||||
INET6_sprint((struct sockaddr *) &sap, 1),
|
||||
plen);
|
||||
printf(" Scope:");
|
||||
switch (scope & IPV6_ADDR_SCOPE_MASK) {
|
||||
case 0:
|
||||
@@ -1019,7 +1019,7 @@ static void ife_print(struct interface *ptr)
|
||||
|
||||
if (ptr->has_ip) {
|
||||
printf(" %s addr:%s ", ap->name,
|
||||
ap->sprint(&ptr->addr, 1));
|
||||
ap->sprint(&ptr->addr, 1));
|
||||
if (ptr->flags & IFF_POINTOPOINT) {
|
||||
printf(" P-t-P:%s ", ap->sprint(&ptr->dstaddr, 1));
|
||||
}
|
||||
@@ -1102,17 +1102,17 @@ static void ife_print(struct interface *ptr)
|
||||
printf(" ");
|
||||
|
||||
printf("RX packets:%llu errors:%lu dropped:%lu overruns:%lu frame:%lu\n",
|
||||
ptr->stats.rx_packets, ptr->stats.rx_errors,
|
||||
ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors,
|
||||
ptr->stats.rx_frame_errors);
|
||||
ptr->stats.rx_packets, ptr->stats.rx_errors,
|
||||
ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors,
|
||||
ptr->stats.rx_frame_errors);
|
||||
if (can_compress)
|
||||
printf(" compressed:%lu\n",
|
||||
ptr->stats.rx_compressed);
|
||||
ptr->stats.rx_compressed);
|
||||
printf(" ");
|
||||
printf("TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n",
|
||||
ptr->stats.tx_packets, ptr->stats.tx_errors,
|
||||
ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors,
|
||||
ptr->stats.tx_carrier_errors);
|
||||
ptr->stats.tx_packets, ptr->stats.tx_errors,
|
||||
ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors,
|
||||
ptr->stats.tx_carrier_errors);
|
||||
printf(" collisions:%lu ", ptr->stats.collisions);
|
||||
if (can_compress)
|
||||
printf("compressed:%lu ", ptr->stats.tx_compressed);
|
||||
@@ -1129,13 +1129,12 @@ static void ife_print(struct interface *ptr)
|
||||
printf(" ");
|
||||
if (ptr->map.irq)
|
||||
printf("Interrupt:%d ", ptr->map.irq);
|
||||
if (ptr->map.base_addr >= 0x100) /* Only print devices using it for
|
||||
I/O maps */
|
||||
if (ptr->map.base_addr >= 0x100) /* Only print devices using it for I/O maps */
|
||||
printf("Base address:0x%lx ",
|
||||
(unsigned long) ptr->map.base_addr);
|
||||
(unsigned long) ptr->map.base_addr);
|
||||
if (ptr->map.mem_start) {
|
||||
printf("Memory:%lx-%lx ", ptr->map.mem_start,
|
||||
ptr->map.mem_end);
|
||||
ptr->map.mem_end);
|
||||
}
|
||||
if (ptr->map.dma)
|
||||
printf("DMA chan:%x ", ptr->map.dma);
|
||||
@@ -1168,7 +1167,7 @@ static struct interface *lookup_interface(char *name)
|
||||
|
||||
#ifdef UNUSED
|
||||
static int for_all_interfaces(int (*doit) (struct interface *, void *),
|
||||
void *cookie)
|
||||
void *cookie)
|
||||
{
|
||||
struct interface *ife;
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ int nc_main(int argc, char **argv)
|
||||
/* getopt32 is _almost_ usable:
|
||||
** it cannot handle "... -e PROG -prog-opt" */
|
||||
while ((opt = getopt(argc, argv,
|
||||
"" IF_NC_SERVER("lp:") IF_NC_EXTRA("w:i:f:e:") )) > 0
|
||||
"" IF_NC_SERVER("lp:") IF_NC_EXTRA("w:i:f:e:") )) > 0
|
||||
) {
|
||||
if (ENABLE_NC_SERVER && opt == 'l')
|
||||
IF_NC_SERVER(do_listen++);
|
||||
|
||||
@@ -1854,7 +1854,7 @@ recv_and_process_client_pkt(void /*int fd*/)
|
||||
msg.m_status = G.stratum < MAXSTRAT ? G.ntp_status : LI_ALARM;
|
||||
msg.m_status |= (query_status & VERSION_MASK);
|
||||
msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ?
|
||||
MODE_SERVER : MODE_SYM_PAS;
|
||||
MODE_SERVER : MODE_SYM_PAS;
|
||||
msg.m_stratum = G.stratum;
|
||||
msg.m_ppoll = G.poll_exp;
|
||||
msg.m_precision_exp = G_precision_exp;
|
||||
@@ -2328,14 +2328,13 @@ set_freq(double freq) /* frequency update */
|
||||
if (pps_enable) {
|
||||
if (!(pll_status & STA_PPSTIME))
|
||||
report_event(EVNT_KERN,
|
||||
NULL, "PPS enabled");
|
||||
NULL, "PPS enabled");
|
||||
ntv.status |= STA_PPSTIME | STA_PPSFREQ;
|
||||
} else {
|
||||
if (pll_status & STA_PPSTIME)
|
||||
report_event(EVNT_KERN,
|
||||
NULL, "PPS disabled");
|
||||
ntv.status &= ~(STA_PPSTIME |
|
||||
STA_PPSFREQ);
|
||||
NULL, "PPS disabled");
|
||||
ntv.status &= ~(STA_PPSTIME | STA_PPSFREQ);
|
||||
}
|
||||
if (sys_leap == LEAP_ADDSECOND)
|
||||
ntv.status |= STA_INS;
|
||||
@@ -2351,7 +2350,7 @@ set_freq(double freq) /* frequency update */
|
||||
if (ntp_adjtime(&ntv) == TIME_ERROR) {
|
||||
if (!(ntv.status & STA_PPSSIGNAL))
|
||||
report_event(EVNT_KERN, NULL,
|
||||
"PPS no signal");
|
||||
"PPS no signal");
|
||||
}
|
||||
pll_status = ntv.status;
|
||||
#ifdef STA_NANO
|
||||
|
||||
@@ -710,7 +710,7 @@ recv_and_process_client_pkt(void /*int fd*/)
|
||||
msg.m_status = G.synced ? G.leap : LI_ALARM;
|
||||
msg.m_status |= (query_status & VERSION_MASK);
|
||||
msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ?
|
||||
MODE_SERVER : MODE_SYM_PAS;
|
||||
MODE_SERVER : MODE_SYM_PAS;
|
||||
msg.m_stratum = G.stratum;
|
||||
msg.m_ppoll = query_ppoll;
|
||||
msg.m_precision_exp = G_precision_exp;
|
||||
|
||||
@@ -724,7 +724,7 @@ static void ping6(len_and_sockaddr *lsa)
|
||||
ICMP6_FILTER_SETPASSALL(&filt);
|
||||
}
|
||||
if (setsockopt(pingsock, IPPROTO_ICMPV6, ICMP6_FILTER, &filt,
|
||||
sizeof(filt)) < 0)
|
||||
sizeof(filt)) < 0)
|
||||
bb_error_msg_and_die("setsockopt(ICMP6_FILTER)");
|
||||
}
|
||||
#endif /*ICMP6_FILTER*/
|
||||
|
||||
@@ -409,7 +409,7 @@ static NOINLINE void INET6_setroute(int action, char **args)
|
||||
bb_error_msg_and_die("resolving %s", args_m1);
|
||||
}
|
||||
memcpy(&rt.rtmsg_gateway, sa6.sin6_addr.s6_addr,
|
||||
sizeof(struct in6_addr));
|
||||
sizeof(struct in6_addr));
|
||||
rt.rtmsg_flags |= RTF_GATEWAY;
|
||||
continue;
|
||||
}
|
||||
@@ -498,11 +498,11 @@ void FAST_FUNC bb_displayroutes(int noresolve, int netstatfmt)
|
||||
FILE *fp = xfopen_for_read("/proc/net/route");
|
||||
|
||||
printf("Kernel IP routing table\n"
|
||||
"Destination Gateway Genmask Flags %s Iface\n",
|
||||
"Destination Gateway Genmask Flags %s Iface\n",
|
||||
netstatfmt ? " MSS Window irtt" : "Metric Ref Use");
|
||||
|
||||
if (fscanf(fp, "%*[^\n]\n") < 0) { /* Skip the first line. */
|
||||
goto ERROR; /* Empty or missing line, or read error. */
|
||||
goto ERROR; /* Empty or missing line, or read error. */
|
||||
}
|
||||
while (1) {
|
||||
int r;
|
||||
@@ -567,8 +567,8 @@ static void INET6_displayroutes(void)
|
||||
FILE *fp = xfopen_for_read("/proc/net/ipv6_route");
|
||||
|
||||
printf("Kernel IPv6 routing table\n%-44s%-40s"
|
||||
"Flags Metric Ref Use Iface\n",
|
||||
"Destination", "Next Hop");
|
||||
"Flags Metric Ref Use Iface\n",
|
||||
"Destination", "Next Hop");
|
||||
|
||||
while (1) {
|
||||
int r;
|
||||
@@ -618,8 +618,8 @@ static void INET6_displayroutes(void)
|
||||
(struct sockaddr *) &snaddr6.sin6_addr);
|
||||
snaddr6.sin6_family = AF_INET6;
|
||||
naddr6 = INET6_rresolve((struct sockaddr_in6 *) &snaddr6,
|
||||
0x0fff /* Apparently, upstream never resolves. */
|
||||
);
|
||||
0x0fff /* Apparently, upstream never resolves. */
|
||||
);
|
||||
|
||||
if (!r) { /* 1st pass */
|
||||
snprintf(addr6, sizeof(addr6), "%s/%d", naddr6, prefix_len);
|
||||
|
||||
Reference in New Issue
Block a user