From 02aca536aec93edd799d67615e47bdb7b5babf4a Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 9 Oct 2015 13:02:25 +0200 Subject: [kernel] Correct documentation Fix mistakes found by 'xmllint'. --- lib/kernel/doc/src/app.xml | 2 +- lib/kernel/doc/src/application.xml | 5 +++-- lib/kernel/doc/src/auth.xml | 8 ++++---- lib/kernel/doc/src/code.xml | 4 ++-- lib/kernel/doc/src/disk_log.xml | 12 ++++++------ lib/kernel/doc/src/erl_ddll.xml | 22 +++++++++++----------- lib/kernel/doc/src/error_logger.xml | 2 +- lib/kernel/doc/src/file.xml | 25 ++++++++++++------------- lib/kernel/doc/src/gen_sctp.xml | 14 ++++++++------ lib/kernel/doc/src/gen_tcp.xml | 5 +++-- lib/kernel/doc/src/gen_udp.xml | 4 ++-- lib/kernel/doc/src/inet.xml | 30 +++++++++++++++--------------- lib/kernel/doc/src/inet_res.xml | 31 ++++++++++++++++++++----------- lib/kernel/doc/src/net_adm.xml | 4 ++-- lib/kernel/doc/src/notes.xml | 7 +++---- lib/kernel/doc/src/os.xml | 4 ++-- 16 files changed, 95 insertions(+), 84 deletions(-) (limited to 'lib/kernel/doc') diff --git a/lib/kernel/doc/src/app.xml b/lib/kernel/doc/src/app.xml index 1591d589af..d6d6167923 100644 --- a/lib/kernel/doc/src/app.xml +++ b/lib/kernel/doc/src/app.xml @@ -191,7 +191,7 @@ RTDeps [ApplicationVersion] [] start phases must be a subset of the set of phases defined for the primary application. Refer to OTP Design Principles for more information.

- runtime_dependencies + runtime_dependencies

A list of application versions that the application depends on. An example of such an application version is "kernel-3.0". Application versions specified as runtime diff --git a/lib/kernel/doc/src/application.xml b/lib/kernel/doc/src/application.xml index 0fe774a73f..4d8e6ce94b 100644 --- a/lib/kernel/doc/src/application.xml +++ b/lib/kernel/doc/src/application.xml @@ -60,8 +60,9 @@ - tuple_of(T) -

A tuple where the elements are of type T.

+ tuple_of(T) +

+ A tuple where the elements are of type T.

diff --git a/lib/kernel/doc/src/auth.xml b/lib/kernel/doc/src/auth.xml index 9ebc6f8f1a..71b1863e96 100644 --- a/lib/kernel/doc/src/auth.xml +++ b/lib/kernel/doc/src/auth.xml @@ -50,7 +50,7 @@ be established in this case. Returns no if Node does not exist or communication is not authorized (it has another cookie than auth thinks it has).

-

Use net_adm:ping(Node) +

Use net_adm:ping(Node) instead.

@@ -71,7 +71,7 @@

Use - erlang:set_cookie(node(), Cookie) + erlang:set_cookie(node(), Cookie) instead.

@@ -94,8 +94,8 @@

Sets the magic cookie of Node to Cookie, and verifies the status of the authorization. Equivalent to calling - erlang:set_cookie(Node, Cookie), followed by - auth:is_auth(Node).

+ erlang:set_cookie(Node, Cookie), followed by + auth:is_auth(Node).

diff --git a/lib/kernel/doc/src/code.xml b/lib/kernel/doc/src/code.xml index 7cdedfa0ba..4e3be35079 100644 --- a/lib/kernel/doc/src/code.xml +++ b/lib/kernel/doc/src/code.xml @@ -180,7 +180,7 @@ example, the call erl_prim_loader:list_dir( "/otp/root/lib/mnesia-4.4.7.ez/mnesia-4.4.7/examples/bench)" would list the contents of a directory inside an archive. - See erl_prim_loader(3)

. + See erl_prim_loader(3).

An application archive file and a regular application directory may coexist. This may be useful when there is a need of having @@ -242,7 +242,7 @@ particular useful to set the flag to relaxed when you want to elaborate with code loading from archives without editing the boot script. The default is relaxed. See init(3)

+ marker="erts:init">init(3)

diff --git a/lib/kernel/doc/src/disk_log.xml b/lib/kernel/doc/src/disk_log.xml index 32488a9f01..7d4a9687ea 100644 --- a/lib/kernel/doc/src/disk_log.xml +++ b/lib/kernel/doc/src/disk_log.xml @@ -233,11 +233,11 @@ + Asynchronously log an item onto a disk log. - Asynchronously log an item onto a disk log.

The alog/2 and balog/2 functions asynchronously append an item to a disk log. The function alog/2 is @@ -288,8 +288,8 @@ - Block a disk log. +

With a call to block/1,2 a process can block a log. If the blocking process is not an owner of the log, a temporary @@ -663,8 +663,8 @@ - Close a disk log on one node. +

The function lclose/1 closes a local log or an individual distributed log on the current node. @@ -744,6 +744,7 @@ + Open a disk log file. @@ -753,7 +754,6 @@ - Open a disk log file.

The ArgL parameter is a list of options which have the following meanings:

@@ -1043,8 +1043,8 @@ If
- Flush the contents of a disk log to the disk. +

The sync/1 function ensures that the contents of the log are actually written to the disk. @@ -1086,8 +1086,8 @@ If - Unblock a disk log. +

The unblock/1 function unblocks a log. A log can only be unblocked by the blocking process. diff --git a/lib/kernel/doc/src/erl_ddll.xml b/lib/kernel/doc/src/erl_ddll.xml index d622725ba0..8d71883cf4 100644 --- a/lib/kernel/doc/src/erl_ddll.xml +++ b/lib/kernel/doc/src/erl_ddll.xml @@ -388,14 +388,14 @@ remove a monitor.

The function accepts the following parameters:

- Tag + Tag

The monitor tag is always driver as this function can only be used to create driver monitors. In the future, driver monitors will be integrated with process monitors, why this parameter has to be given for consistence.

- Item + Item

The Item parameter specifies which driver one wants to monitor (the name of the driver) as well as @@ -642,7 +642,7 @@

The function accepts the following parameters:

- Path + Path

The filesystem path to the directory where the driver object file is situated. The filename of the object file @@ -665,7 +665,7 @@ to have only one loader of a driver one wants to upgrade in a running system!

- Name + Name

The name parameter is the name of the driver to be used in subsequent calls to open_port. The @@ -678,14 +678,14 @@ with this Name parameter, much as a beam-file's module name much correspond to its filename.

- OptionList + OptionList

A number of options can be specified to control the loading operation. The options are given as a list of two-tuples, the tuples having the following values and meanings:

- {driver_options, DriverOptionList} + {driver_options, DriverOptionList}

This option is to provide options that will change its general behavior and will "stick" to the driver @@ -701,7 +701,7 @@ when the last user calls try_unload/2, or the last process having loaded the driver exits.

- {monitor, MonitorOption} + {monitor, MonitorOption}

A MonitorOption tells try_load/3 to trigger a driver monitor under certain @@ -732,7 +732,7 @@ {monitor, pending_driver} in production code (see the monitor discussion above).

- {reload,ReloadOption} + {reload, ReloadOption}

This option is used when one wants to reload a driver from disk, most often in a @@ -910,13 +910,13 @@

The function accepts the following parameters:

- Name + Name

The name parameter is the name of the driver to be unloaded. The name can be specified either as an iolist() or as an atom().

- OptionList + OptionList

The OptionList argument can be used to specify certain behavior regarding ports as well as triggering @@ -934,7 +934,7 @@ unloads, one should use the driver option kill_ports when loading the driver instead.

- {monitor, MonitorOption} + {monitor, MonitorOption}

This option creates a driver monitor if the condition given in MonitorOption is true. The valid diff --git a/lib/kernel/doc/src/error_logger.xml b/lib/kernel/doc/src/error_logger.xml index f83fe53084..92e14c2bef 100644 --- a/lib/kernel/doc/src/error_logger.xml +++ b/lib/kernel/doc/src/error_logger.xml @@ -299,12 +299,12 @@ ok + Enable or disable error printouts to a file - Enable or disable error printouts to a file

Enables or disables printout of standard events to a file.

This is done by adding or deleting the standard event handler diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml index 4954568086..9cd4cfa712 100644 --- a/lib/kernel/doc/src/file.xml +++ b/lib/kernel/doc/src/file.xml @@ -87,9 +87,10 @@ - fd() + fd() -

A file descriptor representing a file opened in + A file descriptor representing a file opened in raw mode.

@@ -491,7 +492,7 @@ List files in a directory -

Lists all files in a directory, except files +

Lists all files in a directory, except files with "raw" names. Returns {ok, Filenames} if successful. Otherwise, it returns {error, Reason}. @@ -1307,15 +1308,15 @@

The current system access to the file.

- atime = date_time() | integer() >= 0 + atime = date_time() | integer() >= 0

The last time the file was read.

- mtime = date_time() | integer() >= 0 + mtime = date_time() | integer() >= 0

The last time the file was written.

- ctime = date_time() | integer() >=0 + ctime = date_time() | integer() >=0

The interpretation of this time field depends on the operating system. On Unix, it is the last time @@ -1745,7 +1746,7 @@ See gen_tcp:controlling_process/2

If the OS used does not support sendfile, an Erlang fallback using file:read and gen_tcp:send is used.

-

The option list can contain the following options: +

The option list can contain the following options:

chunk_size The chunk size used by the erlang fallback to send @@ -1760,7 +1761,6 @@ the sendfile call will return {error,einval}. Introduced in Erlang/OTP 17.0. Default is false. -

@@ -1851,22 +1851,21 @@ Type local will interpret the time set as local, universal will interpret it as universal time and posix must be seconds since or before unix time epoch which is 1970-01-01 00:00 UTC. - Default is {time, local}. + Default is {time, local}.

If the raw option is set, the file server will not be called and only informations about local files will be returned.

-

The following fields are used from the record, if they are given.

- atime = date_time() | integer() >= 0 + atime = date_time() | integer() >= 0

The last time the file was read.

- mtime = date_time() | integer() >= 0 + mtime = date_time() | integer() >= 0

The last time the file was written.

- ctime = date_time() | integer() >= 0 + ctime = date_time() | integer() >= 0

On Unix, any value give for this field will be ignored (the "ctime" for the file will be set to the current diff --git a/lib/kernel/doc/src/gen_sctp.xml b/lib/kernel/doc/src/gen_sctp.xml index b704d90613..456108a2fe 100644 --- a/lib/kernel/doc/src/gen_sctp.xml +++ b/lib/kernel/doc/src/gen_sctp.xml @@ -77,9 +77,10 @@ - assoc_id() + assoc_id() -

An opaque term returned in for example #sctp_paddr_change{} +

+ An opaque term returned in for example #sctp_paddr_change{} that identifies an association for an SCTP socket. The term is opaque except for the special value 0 that has a meaning such as "the whole endpoint" or "all future associations". @@ -98,9 +99,10 @@ - sctp_socket() + sctp_socket() -

Socket identifier returned from open/*.

+

+ Socket identifier returned from open/*.

@@ -146,7 +148,7 @@ Addr and Port. The Timeout, is expressed in milliseconds. A socket can be associated with multiple peers.

-

WARNING:Using a value of Timeout less than +

WARNING:Using a value of Timeout less than the maximum time taken by the OS to establish an association (around 4.5 minutes if the default values from RFC 4960 are used) can result in inconsistent or incorrect return values. This is especially @@ -170,7 +172,7 @@

The number of outbound and inbound streams can be set by giving an sctp_initmsg option to connect as in:

-
  connect(Socket, Ip, Port,
+
  connect(Socket, Ip, Port>,
         [{sctp_initmsg,#sctp_initmsg{num_ostreams=OutStreams,
                                      max_instreams=MaxInStreams}}])        

All options Opt are set on the socket before the diff --git a/lib/kernel/doc/src/gen_tcp.xml b/lib/kernel/doc/src/gen_tcp.xml index 8d9f09cea7..6a19e76c4f 100644 --- a/lib/kernel/doc/src/gen_tcp.xml +++ b/lib/kernel/doc/src/gen_tcp.xml @@ -78,9 +78,10 @@ do_recv(Sock, Bs) -> - socket() + socket() -

As returned by accept/1,2 and connect/3,4.

+

+ As returned by accept/1,2 and connect/3,4.

diff --git a/lib/kernel/doc/src/gen_udp.xml b/lib/kernel/doc/src/gen_udp.xml index 6f34aba43c..79cd87dcef 100644 --- a/lib/kernel/doc/src/gen_udp.xml +++ b/lib/kernel/doc/src/gen_udp.xml @@ -43,9 +43,9 @@ - socket() + socket() -

As returned by open/1,2.

+

As returned by open/1,2.

diff --git a/lib/kernel/doc/src/inet.xml b/lib/kernel/doc/src/inet.xml index e6d418dc58..088d78c1d6 100644 --- a/lib/kernel/doc/src/inet.xml +++ b/lib/kernel/doc/src/inet.xml @@ -4,7 +4,7 @@
- 19972013 + 19972015 Ericsson AB. All Rights Reserved. @@ -117,8 +117,9 @@ fe80::204:acff:fe17:bf38 - socket() -

See gen_tcp(3) + socket() +

+ See gen_tcp(3) and gen_udp(3).

@@ -222,7 +223,7 @@ fe80::204:acff:fe17:bf38

Do not rely too much on the order of Flag atoms or - Ifopt tuples. There are some rules, though: + Ifopt tuples. There are some rules, though:

Immediately after {addr,_} follows {netmask,_} @@ -238,7 +239,6 @@ fe80::204:acff:fe17:bf38 tuple concerns that address. -

The {hwaddr,_} tuple is not returned on Solaris since the hardware address historically belongs to the link layer and only @@ -379,14 +379,14 @@ fe80::204:acff:fe17:bf38 Convert IPv6 / IPV4 adress to ascii -

Parses an ip_address() and returns an IPv4 or IPv6 address string.

+

Parses an ip_address() and returns an IPv4 or IPv6 address string.

Parse an IPv4 address -

Parses an IPv4 address string and returns an ip4_address(). +

Parses an IPv4 address string and returns an ip4_address(). Accepts a shortened IPv4 shortened address string.

@@ -394,14 +394,14 @@ fe80::204:acff:fe17:bf38 Parse an IPv4 address strict. -

Parses an IPv4 address string containing four fields, i.e not shortened, and returns an ip4_address().

+

Parses an IPv4 address string containing four fields, i.e not shortened, and returns an ip4_address().

Parse an IPv6 address -

Parses an IPv6 address string and returns an ip6_address(). +

Parses an IPv6 address string and returns an ip6_address(). If an IPv4 address string is passed, an IPv4-mapped IPv6 address is returned.

@@ -409,22 +409,22 @@ fe80::204:acff:fe17:bf38 Parse an IPv6 address strict. -

Parses an IPv6 address string and returns an ip6_address(). - Does not accept IPv4 adresses.

+

Parses an IPv6 address string and returns an ip6_address(). + Does not accept IPv4 adresses.

Parse an IPv4 or IPv6 address. -

Parses an IPv4 or IPv6 address string and returns an ip4_address() or ip6_address(). Accepts a shortened IPv4 address string.

+

Parses an IPv4 or IPv6 address string and returns an ip4_address() or ip6_address(). Accepts a shortened IPv4 address string.

Parse an IPv4 or IPv6 address strict. -

Parses an IPv4 or IPv6 address string and returns an ip4_address() or ip6_address(). Does not accept a shortened IPv4 address string.

+

Parses an IPv4 or IPv6 address string and returns an ip4_address() or ip6_address(). Does not accept a shortened IPv4 address string.

@@ -862,10 +862,10 @@ fe80::204:acff:fe17:bf38 CAP_SYS_ADMIN according to the documentation for setns(2). However, during testing also CAP_SYS_PTRACE and CAP_DAC_READ_SEARCH has proven to be necessary. - Example: + Example:

setcap cap_sys_admin,cap_sys_ptrace,cap_dac_read_search+epi beam.smp - Note also that the filesystem containing the virtual machine +

Note also that the filesystem containing the virtual machine executable (beam.smp in the example above) has to be local, mounted without the nosetuid flag, support extended attributes and that diff --git a/lib/kernel/doc/src/inet_res.xml b/lib/kernel/doc/src/inet_res.xml index 6a2c9b1955..851a36aba9 100644 --- a/lib/kernel/doc/src/inet_res.xml +++ b/lib/kernel/doc/src/inet_res.xml @@ -4,7 +4,7 @@

- 20092013 + 20092015 Ericsson AB. All Rights Reserved. @@ -77,8 +77,11 @@ query is tried for the alt_nameservers.

+
+ Resolver Types +

The following data types concern the resolver:

+
-

Resolver types:

@@ -88,8 +91,13 @@ - -

DNS types:

+
+
+ DNS Types +

+ The following data types concern the DNS client:

+
+

A string with no adjacent dots.

@@ -106,7 +114,7 @@

This is the start of a hiearchy of opaque data structures that can be examined with access functions in inet_dns that return lists of {Field,Value} tuples. The arity 2 functions - just return the value for a given field. + just return the value for a given field.

 dns_msg() = DnsMsg
     inet_dns:msg(DnsMsg) ->
@@ -154,18 +162,19 @@ dns_rr() = DnsRr
                      | {version, integer()}
                      | {z, integer()}
                      | {data, dns_data()} ]
-    inet_dns:rr(DnsRr, Field) -> Value
+    inet_dns:rr(DnsRr, Field) -> Value
-There is an info function for the types above: +

There is an info function for the types above:

+
 inet_dns:record_type(dns_msg()) -> msg;
 inet_dns:record_type(dns_header()) -> header;
 inet_dns:record_type(dns_query()) -> dns_query;
 inet_dns:record_type(dns_rr()) -> rr;
-inet_dns:record_type(_) -> undefined.
+inet_dns:record_type(_) -> undefined.
-So; inet_dns:(inet_dns:record_type(X))(X) will convert -any of these data structures into a {Field,Value} list.

+

So; inet_dns:(inet_dns:record_type(X))(X) will convert +any of these data structures into a {Field,Value} list.

@@ -272,7 +281,7 @@ any of these data structures into a {Field,Value} list.

Resolve a DNS record of the given type and class for the given name. The returned dns_msg() can be examined using access functions in inet_db as described - in DNS types. + in DNS Types.

If Name is an ip_address(), the domain name to query for is generated as the standard reverse diff --git a/lib/kernel/doc/src/net_adm.xml b/lib/kernel/doc/src/net_adm.xml index 1072be44a5..4ef9d361f6 100644 --- a/lib/kernel/doc/src/net_adm.xml +++ b/lib/kernel/doc/src/net_adm.xml @@ -89,8 +89,8 @@ - Lookup and connect to all nodes at all hosts in .hosts.erlang +

This function calls names(Host) for all hosts which are specified in the Erlang host file .hosts.erlang, @@ -110,8 +110,8 @@ - Lookup and connect to all nodes at specified hosts +

As world/0,1, but the hosts are given as argument instead of being read from .hosts.erlang.

diff --git a/lib/kernel/doc/src/notes.xml b/lib/kernel/doc/src/notes.xml index 76db0c201f..268a8404f1 100644 --- a/lib/kernel/doc/src/notes.xml +++ b/lib/kernel/doc/src/notes.xml @@ -1218,7 +1218,7 @@

Fix returned error from gen_tcp:accept/1,2 when - running out of ports + running out of ports.

The {error, enfile} return value is badly misleading and confusing for this case, since the Posix ENFILE errno @@ -1227,7 +1227,7 @@ {error, system_limit}, which is consistent with e.g. various file(3) functions. inet:format_error/1 has also been updated to support system_limit in the same manner - as file:format_error/1. (Thanks to Per Hedeland)

+ as file:format_error/1. (Thanks to Per Hedeland)

Own Id: OTP-9990

@@ -1422,7 +1422,6 @@ Own Id: OTP-9764

-

Correct callback spec in application module

Refine warning about callback specs with extra ranges

Cleanup @@ -1433,7 +1432,7 @@ analysis

Fix crash in Dialyzer

Variable substitution was not generalizing any unknown variables.

-

+

Own Id: OTP-9776

diff --git a/lib/kernel/doc/src/os.xml b/lib/kernel/doc/src/os.xml index 2d2a690fea..682d4a2eac 100644 --- a/lib/kernel/doc/src/os.xml +++ b/lib/kernel/doc/src/os.xml @@ -171,8 +171,8 @@ DirOut = os:cmd("dir"), % on Win32 platform
- Timestamp = {MegaSecs, Secs, MicroSecs} Current OS system time on the erlang:timestamp/0 format + Timestamp = {MegaSecs, Secs, MicroSecs}

Returns current OS system time @@ -205,7 +205,7 @@ format_utc_timestamp() -> 29 Apr 2009 9:55:30.051711

OS system time can also be retreived by - os:system_time/0, + os:system_time/0, and os:system_time/1.

-- cgit v1.2.3