mirror of
https://git.rtems.org/rtems-docs/
synced 2025-10-17 04:05:58 +08:00
Address several issues from compiling examples
Compiling the code from examples "code-block:: c" along with public includes and a bsp exposed a few issues amongst a lot of false positives. Address some of these: * Terminate struct declarations with ';'. Mainly for pedantic correctness. * Show ptrdiff_t instead of size_t for the sbrk() prototype, matching the current argument type in rtems. * Replace some occurrences of unsigned16 with uint16_t. * Fix odd type declaration, "uint8_t char*" -> "char*". * Use appropriate helper to get chain head instead of invalid access to nonexistent struct member. * Remove several excess '\' escapes. * Use RTEMS_SELF instead of undefined SELF. * Use rtems_task instead of void for task functions. * Add missing stack size parameter in task creation. * Use rtems_interrupt_level instead of undefined rtems_interrupt. * Correct return value format for rtems_object_id_get_api() rtems_object_id_get_index() (enum and uint16_t) and also fix corresponding print formatting. * Correct return value documentation for rtems_object_id_get_class(), rtems_object_id_get_node() and rtems_object_id_get_index() int -> uint32_t. * Use RTEMS_SUCCESSFUL instead of undefined RTEMS_STATUS_SUCCESSFUL and fix return value variable name in rate monotonic examples. * Use RTEMS_TIMEOUT instead of undefined TIMEOUT and RTEMS_PERIOD_STATUS instead of undefined STATUS. * Add missing fields to ftpd configuration. * Correct parameter types in ftpd hook prototype, unsigned char * -> void *. * Fix various code-block:: attributes, c -> makefile and c -> shell. * Add missing parenthesis in socket buffer memory calculation example. * Remove typedef in declaration of mq_attr since it is defiend without typedef in reality. * Update siginfo_t declaration to match current reality. * Update shell user command definition example to include mode, uid and gid.
This commit is contained in:

committed by
Chris Johns

parent
b836c43f19
commit
2e711f2b4b
@@ -103,12 +103,15 @@ provided an alias for ``usercmd`` named ``userecho``.
|
||||
return 0;
|
||||
}
|
||||
rtems_shell_cmd_t Shell_USERCMD_Command = {
|
||||
"usercmd", /* name */
|
||||
"usercmd n1 \[n2 \[n3...]]", /* usage */
|
||||
"user", /* topic */
|
||||
main_usercmd, /* command */
|
||||
NULL, /* alias */
|
||||
NULL /* next */
|
||||
"usercmd", /* name */
|
||||
"usercmd n1 [n2 [n3...]]", /* usage */
|
||||
"user", /* topic */
|
||||
main_usercmd, /* command */
|
||||
NULL, /* alias */
|
||||
NULL, /* next */
|
||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, /* mode */
|
||||
0, /* uid */
|
||||
0 /* gid */
|
||||
};
|
||||
rtems_shell_alias_t Shell_USERECHO_Alias = {
|
||||
"usercmd", /* command */
|
||||
|
@@ -100,7 +100,7 @@ NOTES:
|
||||
EXAMPLES:
|
||||
The following is an example of how to use ``blksync``:
|
||||
|
||||
.. code-block:: c
|
||||
.. code-block:: shell
|
||||
|
||||
blksync /dev/hda1
|
||||
|
||||
@@ -1469,7 +1469,7 @@ ln - make links
|
||||
.. index:: ln
|
||||
|
||||
SYNOPSYS:
|
||||
.. code-block:: c
|
||||
.. code-block:: shell
|
||||
|
||||
ln [-fhinsv] source_file [target_file]
|
||||
ln [-fhinsv] source_file ... target_dir
|
||||
@@ -1729,7 +1729,7 @@ mkdir - create a directory
|
||||
.. index:: mkdir
|
||||
|
||||
SYNOPSYS:
|
||||
.. code-block:: c
|
||||
.. code-block:: shell
|
||||
|
||||
mkdir dir [dir1 .. dirN]
|
||||
|
||||
|
@@ -1030,7 +1030,7 @@ time - time command execution
|
||||
.. index:: time
|
||||
|
||||
SYNOPSYS:
|
||||
.. code-block:: c
|
||||
.. code-block:: shell
|
||||
|
||||
time command [argument ...]
|
||||
|
||||
|
Reference in New Issue
Block a user