summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-11-29 15:29:08 +0100
committerSimon Rettberg2019-11-29 15:29:08 +0100
commit6e994bfc7cce3cdde0c538d1330a114a256fb284 (patch)
tree70852f5b5c8d64d715820e72c666912c9b494fb1
parentAdd "listen for WOL" mode (diff)
downloadjawol-6e994bfc7cce3cdde0c538d1330a114a256fb284.tar.gz
jawol-6e994bfc7cce3cdde0c538d1330a114a256fb284.tar.xz
jawol-6e994bfc7cce3cdde0c538d1330a114a256fb284.zip
Formatting
-rw-r--r--jawol.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/jawol.c b/jawol.c
index 481fafe..4fdd83f 100644
--- a/jawol.c
+++ b/jawol.c
@@ -146,7 +146,7 @@ int main(int argc, char **argv)
case 'b': options.broadcast = true; gotif = true; break;
case 'D': options.debug = true; break;
case 'i': options.ifname = optarg; gotif = true; break;
- case 'p': get_wol_pw( optarg ); break;
+ case 'p': get_wol_pw( optarg ); break;
case 'v': options.verbose = true; break;
case 'h': print_usage( argv[0] ); return 0;
case 'd': options.dest = get_ip( optarg ); gotip = true; break;
@@ -386,11 +386,11 @@ static void get_wol_pw(const char *optarg)
int i;
byte_cnt = sscanf(optarg, "%2x:%2x:%2x:%2x:%2x:%2x",
- &passwd[0], &passwd[1], &passwd[2],
- &passwd[3], &passwd[4], &passwd[5]);
+ &passwd[0], &passwd[1], &passwd[2],
+ &passwd[3], &passwd[4], &passwd[5]);
if (byte_cnt < 4) { // Support 4 chars in this notion
byte_cnt = sscanf(optarg, "%u.%u.%u.%u",
- &passwd[0], &passwd[1], &passwd[2], &passwd[3]);
+ &passwd[0], &passwd[1], &passwd[2], &passwd[3]);
}
if (byte_cnt < 4) {
fprintf(stderr, "Unable to read the Wake-On-LAN password.\n");
@@ -471,11 +471,11 @@ static int get_dest_addr(const char *hostid, struct ether_addr *dest_ether)
}
} else {
fprintf(stderr,
- "The Magic Packet host address must be "
- "specified as\n"
- " - a station address, 00:11:22:33:44:55, or\n"
- " - a station address, 00-11-22-33-44-55, or\n"
- " - a hostname with a known 'ethers' entry.\n");
+ "The Magic Packet host address must be "
+ "specified as\n"
+ " - a station address, 00:11:22:33:44:55, or\n"
+ " - a station address, 00-11-22-33-44-55, or\n"
+ " - a hostname with a known 'ethers' entry.\n");
return -1;
}
return 0;
@@ -493,7 +493,6 @@ static struct in_addr get_ip(const char *arg)
static int wolisten(bool force)
{
- // TODO: RAW
struct pollfd socks[2] = {{.events = POLLIN},{.events = POLLIN}};
int num = 0;
// UDP setup