[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT PATCH 4/5] lib/uklibparam: Add missing return value check



We add a check for the return value of kernel_args_set.
---
 lib/uklibparam/param.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/uklibparam/param.c b/lib/uklibparam/param.c
index c0c65782..948150cd 100644
--- a/lib/uklibparam/param.c
+++ b/lib/uklibparam/param.c
@@ -570,6 +570,11 @@ int uk_libparam_parse(const char *progname, int argc, char 
**argv)
                }
 
                rc = kernel_args_set(&pargs, param);
+               if (rc < 0) {
+                       uk_pr_err("Failed to set %s param\n", pargs.param);
+                       continue;
+               }
+
                uk_pr_info("Parsed %d args\n", cnt);
        }
 
-- 
2.27.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.