mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
binfmt/copyactions: fix comments, make the actions life cycle more clear
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
+2
-1
@@ -177,7 +177,8 @@ void binfmt_freeargv(FAR char * const *argv);
|
|||||||
* do not have any real option other than to copy the callers action list.
|
* do not have any real option other than to copy the callers action list.
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* copy - Pointer of file actions
|
* copy - Pointer of the copied output file actions
|
||||||
|
* actions - Pointer of file actions to be copy
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* A non-zero copy is returned on success.
|
* A non-zero copy is returned on success.
|
||||||
|
|||||||
@@ -52,7 +52,8 @@
|
|||||||
* do not have any real option other than to copy the callers action list.
|
* do not have any real option other than to copy the callers action list.
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* copy - Pointer of file actions
|
* copy - Pointer of the copied output file actions
|
||||||
|
* actions - Pointer of file actions to be copy
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* A non-zero copy is returned on success.
|
* A non-zero copy is returned on success.
|
||||||
@@ -108,6 +109,11 @@ int binfmt_copyactions(FAR const posix_spawn_file_actions_t **copy,
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We need to copy and re-organize the flink chain, be care not modify
|
||||||
|
* the actions it self, the prev have to point to the last time foreach
|
||||||
|
* item.
|
||||||
|
*/
|
||||||
|
|
||||||
for (entry = (FAR struct spawn_general_file_action_s *)actions,
|
for (entry = (FAR struct spawn_general_file_action_s *)actions,
|
||||||
prev = NULL; entry != NULL; entry = entry->flink)
|
prev = NULL; entry != NULL; entry = entry->flink)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user