Skip to content

Commit

Permalink
SplitCommandLine should be aware of tabs and newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
jlowellwofford committed Jan 5, 2021
1 parent 89d2efb commit a5a9b4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/cmdline/cmdline.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BOOT_IMAGE=(hd0,msdos1)/boot/vmlinuz-4.18.0-80.el8.x86_64 root=UUID=d5f5b677-6350-416d-b1d3-47d723d94d88 ro no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop uinit.bool uinit.empty= uinit.key=value uinit.quote="once upon a time"
BOOT_IMAGE=(hd0,msdos1)/boot/vmlinuz-4.18.0-80.el8.x86_64 root=UUID=d5f5b677-6350-416d-b1d3-47d723d94d88 ro no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop uinit.bool uinit.empty= uinit.key=value uinit.quote="once upon a time" uinit.newline="ends in a newline"
2 changes: 1 addition & 1 deletion util.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func SplitCommandLine(s string) []string {
case mapGt(lastRune, 0):
return false
default:
return c == ' '
return c == ' ' || c == '\n' || c == '\t'
}
}
return strings.FieldsFunc(s, f)
Expand Down

0 comments on commit a5a9b4f

Please # to comment.