diff options
author | Björn-Egil Dahlberg <[email protected]> | 2012-07-17 19:24:32 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2012-07-19 20:22:53 +0200 |
commit | c37a976174c298be456eff560031c31d89d598a1 (patch) | |
tree | 45514d243a97b07035b9cd65a3813843190dce81 /lib/kernel/src/inet_config.erl | |
parent | 5ba4cddd7192e190f5d6f615e600912ac3ed7720 (diff) | |
download | otp-c37a976174c298be456eff560031c31d89d598a1.tar.gz otp-c37a976174c298be456eff560031c31d89d598a1.tar.bz2 otp-c37a976174c298be456eff560031c31d89d598a1.zip |
kernel: Remove VxWorks
Diffstat (limited to 'lib/kernel/src/inet_config.erl')
-rw-r--r-- | lib/kernel/src/inet_config.erl | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/lib/kernel/src/inet_config.erl b/lib/kernel/src/inet_config.erl index 1ddbdcec25..526baca335 100644 --- a/lib/kernel/src/inet_config.erl +++ b/lib/kernel/src/inet_config.erl @@ -197,16 +197,6 @@ do_load_resolv({win32,Type}, longnames) -> win32_load_from_registry(Type), inet_db:set_lookup([native]); -do_load_resolv(vxworks, _) -> - vxworks_load_hosts(), - inet_db:set_lookup([file, dns]), - case os:getenv("ERLRESCONF") of - false -> - no_ERLRESCONF; - Resolv -> - load_resolv(Resolv, resolv) - end; - do_load_resolv(_, _) -> inet_db:set_lookup([native]). @@ -408,55 +398,6 @@ win32_get_strings(Reg, [Name|Rest], Result) -> win32_get_strings(_, [], Result) -> lists:reverse(Result). -%% -%% Load host data from VxWorks hostShow command -%% - -vxworks_load_hosts() -> - HostShow = os:cmd("hostShow"), - case check_hostShow(HostShow) of - Hosts when is_list(Hosts) -> - case inet_parse:hosts_vxworks({chars, Hosts}) of - {ok, Ls} -> - foreach( - fun({IP, Name, Aliases}) -> - inet_db:add_host(IP, [Name|Aliases]) - end, - Ls); - {error,Reason} -> - error("parser error VxWorks hostShow ~s", [Reason]) - end; - _Error -> - error("error in VxWorks hostShow~s~n", [HostShow]) - end. - -%% -%% Check if hostShow yields at least two line; the first one -%% starting with "hostname", the second one starting with -%% "--------". -%% Returns: list of hosts in VxWorks notation -%% rows of 'Name IP [Aliases] \n' -%% if hostShow yielded these two lines, false otherwise. -check_hostShow(HostShow) -> - check_hostShow(["hostname", "--------"], HostShow). - -check_hostShow([], HostShow) -> - HostShow; -check_hostShow([String_match|Rest], HostShow) -> - case lists:prefix(String_match, HostShow) of - true -> - check_hostShow(Rest, next_line(HostShow)); - false -> - false - end. - -next_line([]) -> - []; -next_line([$\n|Rest]) -> - Rest; -next_line([_First|Rest]) -> - next_line(Rest). - read_rc() -> {RcFile,CfgList} = read_inetrc(), case extract_cfg_files(CfgList, [], []) of |