All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v1] Add documentation for tst_parse_* helpers functions
@ 2021-12-07 13:35 Andrea Cervesato via ltp
  2021-12-07 18:56 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Andrea Cervesato via ltp @ 2021-12-07 13:35 UTC (permalink / raw)
  To: ltp

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
 doc/c-test-api.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/doc/c-test-api.txt b/doc/c-test-api.txt
index 64d0630ce..b03124ed3 100644
--- a/doc/c-test-api.txt
+++ b/doc/c-test-api.txt
@@ -457,15 +457,17 @@ NOTE: The test parameters must not collide with common test parameters defined
 [source,c]
 -------------------------------------------------------------------------------
 int tst_parse_int(const char *str, int *val, int min, int max);
+int tst_parse_long(const char *str, long *val, long min, long max);
 int tst_parse_float(const char *str, float *val, float min, float max);
+int tst_parse_filesize(const char *str, long long *val, long long min, long long max);
 -------------------------------------------------------------------------------
 
 Helpers for parsing the strings returned in the 'struct tst_option'.
 
-Both return zero on success and 'errno', mostly 'EINVAL' or 'ERANGE', on
+Helpers return zero on success and 'errno', mostly 'EINVAL' or 'ERANGE', on
 failure.
 
-Both functions are no-op if 'str' is 'NULL'.
+Helpers functions are no-op if 'str' is 'NULL'.
 
 The valid range for result includes both 'min' and 'max'.
 
-- 
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH v1] Add documentation for tst_parse_* helpers functions
  2021-12-07 13:35 [LTP] [PATCH v1] Add documentation for tst_parse_* helpers functions Andrea Cervesato via ltp
@ 2021-12-07 18:56 ` Cyril Hrubis
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2021-12-07 18:56 UTC (permalink / raw)
  To: Andrea Cervesato; +Cc: ltp

Hi!
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
>  doc/c-test-api.txt | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/c-test-api.txt b/doc/c-test-api.txt
> index 64d0630ce..b03124ed3 100644
> --- a/doc/c-test-api.txt
> +++ b/doc/c-test-api.txt
> @@ -457,15 +457,17 @@ NOTE: The test parameters must not collide with common test parameters defined
>  [source,c]
>  -------------------------------------------------------------------------------
>  int tst_parse_int(const char *str, int *val, int min, int max);
> +int tst_parse_long(const char *str, long *val, long min, long max);
>  int tst_parse_float(const char *str, float *val, float min, float max);
> +int tst_parse_filesize(const char *str, long long *val, long long min, long long max);
>  -------------------------------------------------------------------------------
>  
>  Helpers for parsing the strings returned in the 'struct tst_option'.
>  
> -Both return zero on success and 'errno', mostly 'EINVAL' or 'ERANGE', on
> +Helpers return zero on success and 'errno', mostly 'EINVAL' or 'ERANGE', on
>  failure.
>  
> -Both functions are no-op if 'str' is 'NULL'.
> +Helpers functions are no-op if 'str' is 'NULL'.
>  
>  The valid range for result includes both 'min' and 'max'.

Maybe we should list what are the valid units for the tst_parse_filesize
here as well, otherwise it looks good.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-07 18:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 13:35 [LTP] [PATCH v1] Add documentation for tst_parse_* helpers functions Andrea Cervesato via ltp
2021-12-07 18:56 ` Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.