~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/kernel/src/erl_boot_server.erl

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%
2
2
%% %CopyrightBegin%
3
3
%%
4
 
%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
 
4
%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
5
5
%%
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
59
59
 
60
60
-type ip4_address() :: {0..255,0..255,0..255,0..255}.
61
61
 
62
 
-spec start(Slaves :: [atom()]) -> {'ok', pid()} | {'error', any()}.
 
62
-spec start(Slaves) -> {'ok', Pid} | {'error', What} when
 
63
      Slaves :: [Host],
 
64
      Host :: atom(),
 
65
      Pid :: pid(),
 
66
      What :: any().
63
67
 
64
68
start(Slaves) ->
65
69
    case check_arg(Slaves) of
69
73
            {error, {badarg, Slaves}}
70
74
    end.
71
75
 
72
 
-spec start_link(Slaves :: [atom()]) -> {'ok', pid()} | {'error', any()}.
 
76
-spec start_link(Slaves) -> {'ok', Pid} | {'error', What} when
 
77
      Slaves :: [Host],
 
78
      Host :: atom(),
 
79
      Pid :: pid(),
 
80
      What :: any().
73
81
 
74
82
start_link(Slaves) ->
75
83
    case check_arg(Slaves) of
95
103
check_arg(_, _Result) ->
96
104
    error.
97
105
 
98
 
-spec add_slave(Slave :: atom()) -> 'ok' | {'error', any()}.
 
106
-spec add_slave(Slave) -> 'ok' | {'error', What} when
 
107
      Slave :: Host,
 
108
      Host :: atom(),
 
109
      What :: any().
99
110
 
100
111
add_slave(Slave) ->
101
112
    case inet:getaddr(Slave, inet) of
105
116
            {error, {badarg, Slave}}
106
117
    end.
107
118
 
108
 
-spec delete_slave(Slave :: atom()) -> 'ok' | {'error', any()}.
 
119
-spec delete_slave(Slave) -> 'ok' | {'error', What} when
 
120
      Slave :: Host,
 
121
      Host :: atom(),
 
122
      What :: any().
109
123
 
110
124
delete_slave(Slave) ->
111
125
    case inet:getaddr(Slave, inet) of
131
145
delete_subnet(Mask, Addr) when is_tuple(Mask), is_tuple(Addr) ->
132
146
    gen_server:call(boot_server, {delete, {Mask, Addr}}).
133
147
 
134
 
-spec which_slaves() -> [atom()].
 
148
-spec which_slaves() -> Slaves when
 
149
      Slaves :: [Host],
 
150
      Host :: atom().
135
151
 
136
152
which_slaves() ->
137
153
    gen_server:call(boot_server, which).