diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-12-17 13:39:40 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-12-17 13:39:40 +0000 |
commit | bb563397616a67320b7dbc786195ca52693b880b (patch) | |
tree | fd73ec5817a8ca6a9502e9f0c3fb0cc0080162ee /src/ecosboard.c | |
parent | ff2cb7714f34febb797046058f6b8cf375a9f63e (diff) | |
download | riscv-openocd-bb563397616a67320b7dbc786195ca52693b880b.zip riscv-openocd-bb563397616a67320b7dbc786195ca52693b880b.tar.gz riscv-openocd-bb563397616a67320b7dbc786195ca52693b880b.tar.bz2 |
houskeeping
git-svn-id: svn://svn.berlios.de/openocd/trunk@1255 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/ecosboard.c')
-rw-r--r-- | src/ecosboard.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/src/ecosboard.c b/src/ecosboard.c index d2c11b3..019eb0e 100644 --- a/src/ecosboard.c +++ b/src/ecosboard.c @@ -419,60 +419,6 @@ static int zylinjtag_Jim_Command_reboot(Jim_Interp *interp, int argc, return JIM_OK; } -static int zylinjtag_Jim_Command_mac(Jim_Interp *interp, int argc, - Jim_Obj * const *argv) -{ - - Jim_Obj *tclOutput = Jim_NewStringObj(interp, "", 0); - - Jim_AppendString(httpstate.jim_interp, tclOutput, hwaddr, strlen(hwaddr)); - - Jim_SetResult(interp, tclOutput); - - return JIM_OK; -} - -static int zylinjtag_Jim_Command_ip(Jim_Interp *interp, int argc, - Jim_Obj * const *argv) -{ - Jim_Obj *tclOutput = Jim_NewStringObj(interp, "", 0); - - struct ifaddrs *ifa = NULL, *ifp = NULL; - - if (getifaddrs(&ifp) < 0) - { - return JIM_ERR; - } - - for (ifa = ifp; ifa; ifa = ifa->ifa_next) - { - char ip[200]; - socklen_t salen; - - if (ifa->ifa_addr->sa_family == AF_INET) - salen = sizeof(struct sockaddr_in); - else if (ifa->ifa_addr->sa_family == AF_INET6) - salen = sizeof(struct sockaddr_in6); - else - continue; - - if (getnameinfo(ifa->ifa_addr, salen, ip, sizeof(ip), NULL, 0, - NI_NUMERICHOST) < 0) - { - continue; - } - - Jim_AppendString(httpstate.jim_interp, tclOutput, ip, strlen(ip)); - break; - - } - - freeifaddrs(ifp); - - Jim_SetResult(interp, tclOutput); - - return JIM_OK; -} extern Jim_Interp *interp; @@ -506,10 +452,6 @@ static void zylinjtag_startNetwork() zylinjtag_Jim_Command_reboot, NULL, NULL); Jim_CreateCommand(httpstate.jim_interp, "threads", zylinjtag_Jim_Command_threads, NULL, NULL); - Jim_CreateCommand(httpstate.jim_interp, "mac", zylinjtag_Jim_Command_mac, - NULL, NULL); - Jim_CreateCommand(httpstate.jim_interp, "ip", zylinjtag_Jim_Command_ip, - NULL, NULL); Jim_CreateCommand(httpstate.jim_interp, "format_jffs2", zylinjtag_Jim_Command_format_jffs2, NULL, NULL); |