History log of /kvmtool/util/parse-options.c (Results 1 – 7 of 7)
Revision Date Author Comments
# 2cc4929c 07-Jul-2023 Alexandru Elisei <alexandru.elisei@arm.com>

util: Make pr_err() return void

Of all the pr_* functions, pr_err() is the only function that returns a
value, which is -1. The code in parse_options is the only code that relies
on pr_err() returni

util: Make pr_err() return void

Of all the pr_* functions, pr_err() is the only function that returns a
value, which is -1. The code in parse_options is the only code that relies
on pr_err() returning a value, and that value must be exactly -1, because
it is being treated differently than the other return values.

This makes the code opaque, because it's not immediately obvious where that
value comes from, and fragile, as a change in the return value of pr_err
would break it.

Make pr_err() more like the other functions and don't return a value.

Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20230707151119.81208-2-alexandru.elisei@arm.com
Signed-off-by: Will Deacon <will@kernel.org>

show more ...


# 599ed2a8 18-Dec-2011 Cyrill Gorcunov <gorcunov@gmail.com>

kvm tools: Rename pr_error to pr_err to follow kernel convention

The kernel already has pr_err helper lets do the same.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enbe

kvm tools: Rename pr_error to pr_err to follow kernel convention

The kernel already has pr_err helper lets do the same.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 01b6ba3a 23-Sep-2011 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

kvm tools: don't use custom strtoul for hex numbers

Cc: kvm@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# dec94ae9 07-Jun-2011 Cyrill Gorcunov <gorcunov@gmail.com>

kvm tools: Options parser to handle hex numbers

Some kernel parameters are convenient if passed in
hex form so our options parser should handle even
such form of input.

Signed-off-by: Cyrill Gorcun

kvm tools: Options parser to handle hex numbers

Some kernel parameters are convenient if passed in
hex form so our options parser should handle even
such form of input.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 4542f276 18-May-2011 Cyrill Gorcunov <gorcunov@gmail.com>

kvm tools: Prefix error() and friends helpers with pr_

To look more familiar with kernel functions.

Suggested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Ack

kvm tools: Prefix error() and friends helpers with pr_

To look more familiar with kernel functions.

Suggested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 3fdf659d 05-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Abolishment of uint*_t types

Clean uint*_t type from the code.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 98ee79f4 08-Apr-2011 Prasad Joshi <prasadjoshi124@gmail.com>

kvm tools: Use code from perf for argument processing

- parse-options.[ch] has argument processing code.

- types.h: Additional types for argument processing.

- strbuf.[ch]: Added a function prefix

kvm tools: Use code from perf for argument processing

- parse-options.[ch] has argument processing code.

- types.h: Additional types for argument processing.

- strbuf.[ch]: Added a function prefixcmp to compare string prefix

Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...