Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugtool: fix IP route debug gathering commands
Commit 8bcc4e5 ("bugtool: avoid allocation on conversion of execCommand result to string") broke the `ip route show` commands because the change from `[]byte` to `string` causes the `%v` formatting verb to emit the raw byte slice, not the string. Fix this by using the `%s` formatting verb to make sure the argument gets interpreted as a string. Also fix another instance in `writeCmdToFile` where `fmt.Fprint` is now invoked with a byte slice. Grepping for `%v` in bugtool sources and manually inspecting all changes from commit 8bcc4e5 showed no other instances where a byte slice could potentially end up being formatted in a wrong way. Fixes: 8bcc4e5 ("bugtool: avoid allocation on conversion of execCommand result to string") Signed-off-by: Tobias Klauser <tobias@cilium.io>
- Loading branch information