From 5e8bc63022d00c80ed6d3851d5c50883a1488cf6 Mon Sep 17 00:00:00 2001 From: RetricSu Date: Sat, 12 Oct 2024 10:24:24 +0800 Subject: [PATCH 1/3] fix(docs): update const error-code in syscall page --- website/docs/script/syscalls_for_script.mdx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/website/docs/script/syscalls_for_script.mdx b/website/docs/script/syscalls_for_script.mdx index cada0018..9c702c25 100644 --- a/website/docs/script/syscalls_for_script.mdx +++ b/website/docs/script/syscalls_for_script.mdx @@ -48,13 +48,18 @@ A collection of CKB-VM syscalls. Also include relevant constant, such as return These are the return codes used by the CKB-VM syscalls. -| Const No. | C Example | Description | -| --------- | ---------------------- | ---------------------------------------------- | -| 0 | CKB_SUCCESS | No error. | -| 1 | CKB_INDEX_OUT_OF_BOUND | Index out of bound. (e.g. No such input Cell.) | -| 2 | CKB_ITEM_MISSING | The requested resource does not exist. | -| 3 | CKB_LENGTH_NOT_ENOUGH | The supplied memory buffer too small. | -| 4 | CKB_INVALID_DATA | The data provided is invalid. | +| Const No. | C Example | Description | +| --------- | ---------------------- | -------------------------------------------------------- | +| 0 | CKB_SUCCESS | No error. | +| 1 | CKB_INDEX_OUT_OF_BOUND | Index out of bound. (e.g. No such input Cell.) | +| 2 | CKB_ITEM_MISSING | The requested resource does not exist. | +| 3 | CKB_LENGTH_NOT_ENOUGH | The supplied memory buffer too small. | +| 4 | CKB_INVALID_DATA | The data provided is invalid. | +| 5 | CKB_WAIT_FAILURE | The file descriptor is invalid during syscall [Wait. | +| 6 | CKB_INVALID_FD | The file descriptor is not owned by this process. | +| 7 | CKB_OTHER_END_CLOSED | The other end of the pipe is closed. | +| 8 | CKB_MAX_VMS_SPAWNED | The maximum count of spawned processes has been reached. | +| 9 | CKB_MAX_FDS_CREATED | The maximum count of created pipes has been reached. | ### Source From 8495fac389fc56a53bddc86084db81a641dc65d9 Mon Sep 17 00:00:00 2001 From: RetricSu Date: Sat, 12 Oct 2024 10:26:51 +0800 Subject: [PATCH 2/3] chore: remove [ --- website/docs/script/syscalls_for_script.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/script/syscalls_for_script.mdx b/website/docs/script/syscalls_for_script.mdx index 9c702c25..41b21279 100644 --- a/website/docs/script/syscalls_for_script.mdx +++ b/website/docs/script/syscalls_for_script.mdx @@ -55,7 +55,7 @@ These are the return codes used by the CKB-VM syscalls. | 2 | CKB_ITEM_MISSING | The requested resource does not exist. | | 3 | CKB_LENGTH_NOT_ENOUGH | The supplied memory buffer too small. | | 4 | CKB_INVALID_DATA | The data provided is invalid. | -| 5 | CKB_WAIT_FAILURE | The file descriptor is invalid during syscall [Wait. | +| 5 | CKB_WAIT_FAILURE | The file descriptor is invalid during syscall Wait. | | 6 | CKB_INVALID_FD | The file descriptor is not owned by this process. | | 7 | CKB_OTHER_END_CLOSED | The other end of the pipe is closed. | | 8 | CKB_MAX_VMS_SPAWNED | The maximum count of spawned processes has been reached. | From 94bfe404835517386cd4f1cda486ba1d9d03a4a6 Mon Sep 17 00:00:00 2001 From: RetricSu Date: Tue, 15 Oct 2024 10:32:04 +0800 Subject: [PATCH 3/3] apply review suggestion --- website/docs/script/syscalls_for_script.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/script/syscalls_for_script.mdx b/website/docs/script/syscalls_for_script.mdx index 41b21279..68086e36 100644 --- a/website/docs/script/syscalls_for_script.mdx +++ b/website/docs/script/syscalls_for_script.mdx @@ -51,9 +51,9 @@ These are the return codes used by the CKB-VM syscalls. | Const No. | C Example | Description | | --------- | ---------------------- | -------------------------------------------------------- | | 0 | CKB_SUCCESS | No error. | -| 1 | CKB_INDEX_OUT_OF_BOUND | Index out of bound. (e.g. No such input Cell.) | +| 1 | CKB_INDEX_OUT_OF_BOUND | Index out of bounds (e.g., no such input Cell). | | 2 | CKB_ITEM_MISSING | The requested resource does not exist. | -| 3 | CKB_LENGTH_NOT_ENOUGH | The supplied memory buffer too small. | +| 3 | CKB_LENGTH_NOT_ENOUGH | The supplied memory buffer is too small. | | 4 | CKB_INVALID_DATA | The data provided is invalid. | | 5 | CKB_WAIT_FAILURE | The file descriptor is invalid during syscall Wait. | | 6 | CKB_INVALID_FD | The file descriptor is not owned by this process. |