Skip to content

Commit

Permalink
fix(ukargparse): Split only first = of kernel args
Browse files Browse the repository at this point in the history
Signed-off-by: Jhon Jairo Sanchez Benavides <j.jairosanchez.b@gmail.com>
  • Loading branch information
jjsanchezb committed Mar 13, 2024
1 parent 0945cee commit 692b470
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unikraft/export/v0/ukargparse/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func Parse(args ...string) (Params, error) {
params := []Param{}

for _, arg := range args {
nameAndValue := strings.Split(arg, "=")
nameAndValue := strings.SplitN(arg, "=", 2)
if len(nameAndValue) != 2 {
return nil, fmt.Errorf("expected param to be in the format 'libname.param=value' but got: '%s'", arg)
}
Expand Down

0 comments on commit 692b470

Please sign in to comment.