From 7f1b556bae7b836dda1de227264438f6384f3ad7 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Thu, 12 Mar 2015 02:33:24 +0100 Subject: [PATCH] [SQUASH ME] adapt shell commands a little --- sys/shell/commands/Makefile | 6 +++--- sys/shell/commands/{sc_ng_icmpv6.c => sc_icmpv6.c} | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) rename sys/shell/commands/{sc_ng_icmpv6.c => sc_icmpv6.c} (94%) diff --git a/sys/shell/commands/Makefile b/sys/shell/commands/Makefile index a294933325ee..45dd8beab0df 100644 --- a/sys/shell/commands/Makefile +++ b/sys/shell/commands/Makefile @@ -37,9 +37,6 @@ endif ifneq (,$(filter lpc2387,$(USEMODULE))) SRC += sc_heap.c endif -ifneq (,$(filter ng_icmpv6,$(USEMODULE))) - SRC += sc_ng_icmpv6.c -endif ifneq (,$(filter random,$(USEMODULE))) SRC += sc_mersenne.c endif @@ -65,6 +62,9 @@ ifneq (,$(filter ng_netif,$(USEMODULE))) endif endif endif +ifneq (,$(filter ng_icmpv6,$(USEMODULE))) + SRC += sc_icmpv6.c +endif # TODO # Conditional building not possible at the moment due to diff --git a/sys/shell/commands/sc_ng_icmpv6.c b/sys/shell/commands/sc_icmpv6.c similarity index 94% rename from sys/shell/commands/sc_ng_icmpv6.c rename to sys/shell/commands/sc_icmpv6.c index ae225fb5f9d3..f27116aecf20 100644 --- a/sys/shell/commands/sc_ng_icmpv6.c +++ b/sys/shell/commands/sc_icmpv6.c @@ -72,7 +72,7 @@ void _handle_reply(ng_pktsnip_t *pkt, uint64_t time) LL_SEARCH_SCALAR(pkt, icmpv6, type, NG_NETTYPE_ICMPV6); if ((ipv6 == NULL) || (icmpv6 == NULL)) { - puts("IPv6 header or ICMPv6 header not found in reply"); + puts("error: IPv6 header or ICMPv6 header not found in reply"); return; } @@ -124,14 +124,14 @@ void _icmpv6_ping(int argc, char **argv) } if (ng_netreg_register(NG_NETTYPE_ICMPV6, &my_entry) < 0) { - puts("registry is full"); + puts("error: registry is full"); return; } ipv6_entry = ng_netreg_lookup(NG_NETTYPE_IPV6, NG_NETREG_DEMUX_CTX_ALL); if (ipv6_entry == NULL) { - puts("ipv6 thread missing"); + puts("error: ipv6 thread missing"); return; } @@ -143,7 +143,7 @@ void _icmpv6_ping(int argc, char **argv) pkt = ng_icmpv6_echo_req_build(id, seq, NULL, payload_len); if (pkt == NULL) { - puts("packet buffer full"); + puts("error: packet buffer full"); } _set_payload(pkt->data, payload_len); @@ -152,7 +152,7 @@ void _icmpv6_ping(int argc, char **argv) sizeof(ng_ipv6_addr_t)); if (ipv6 == NULL) { - puts("packet buffer full"); + puts("error: packet buffer full"); return; }