projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
getty: do not emit bogus error message on EOF
[oweals/busybox.git]
/
networking
/
ether-wake.c
diff --git
a/networking/ether-wake.c
b/networking/ether-wake.c
index 59f40535ce9ec9bef06fc44cd31a20f66b965ac0..deeb68c096aeaebb1456afe6af9b1fde7fdf37fb 100644
(file)
--- a/
networking/ether-wake.c
+++ b/
networking/ether-wake.c
@@
-111,10
+111,9
@@
static void get_dest_addr(const char *hostid, struct ether_addr *eaddr)
{
struct ether_addr *eap;
{
struct ether_addr *eap;
- eap = ether_aton
(hostid
);
+ eap = ether_aton
_r(hostid, eaddr
);
if (eap) {
if (eap) {
- *eaddr = *eap;
- bb_debug_msg("The target station address is %s\n\n", ether_ntoa(eaddr));
+ bb_debug_msg("The target station address is %s\n\n", ether_ntoa(eap));
#if !defined(__UCLIBC_MAJOR__) \
|| __UCLIBC_MAJOR__ > 0 \
|| __UCLIBC_MINOR__ > 9 \
#if !defined(__UCLIBC_MAJOR__) \
|| __UCLIBC_MAJOR__ > 0 \
|| __UCLIBC_MINOR__ > 9 \
@@
-122,8
+121,9
@@
static void get_dest_addr(const char *hostid, struct ether_addr *eaddr)
} else if (ether_hostton(hostid, eaddr) == 0) {
bb_debug_msg("Station address for hostname %s is %s\n\n", hostid, ether_ntoa(eaddr));
#endif
} else if (ether_hostton(hostid, eaddr) == 0) {
bb_debug_msg("Station address for hostname %s is %s\n\n", hostid, ether_ntoa(eaddr));
#endif
- } else
+ } else
{
bb_show_usage();
bb_show_usage();
+ }
}
static int get_fill(unsigned char *pkt, struct ether_addr *eaddr, int broadcast)
}
static int get_fill(unsigned char *pkt, struct ether_addr *eaddr, int broadcast)
@@
-167,7
+167,7
@@
static int get_wol_pw(const char *ethoptarg, unsigned char *wol_passwd)
byte_cnt = sscanf(ethoptarg, "%u.%u.%u.%u",
&passwd[0], &passwd[1], &passwd[2], &passwd[3]);
if (byte_cnt < 4) {
byte_cnt = sscanf(ethoptarg, "%u.%u.%u.%u",
&passwd[0], &passwd[1], &passwd[2], &passwd[3]);
if (byte_cnt < 4) {
- bb_error_msg("can
no
t read Wake-On-LAN pass");
+ bb_error_msg("can
'
t read Wake-On-LAN pass");
return 0;
}
// TODO: check invalid numbers >255??
return 0;
}
// TODO: check invalid numbers >255??