Remove trailing newline from wwlog

I noticed that some wwlog calls included a trailing newline, but others
did not. I tested both in isolation and discovered that the behavior was
consistent regardless of whether a trailing newline was included. I
further confirmed in code that wwlog appends a trailing newline
automatically if it is not present; so a trailing newline is unnecessary
in individual calls.

This commit removes trailing newlines from all calls to make them
consistent. It also replaces two calls to wwlog.Printf. (see #534)

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
This commit is contained in:
Jonathon Anderson
2022-09-15 12:38:03 -06:00
parent fc39209fbb
commit 0b3e862bea
58 changed files with 327 additions and 327 deletions

View File

@@ -23,16 +23,16 @@ var (
)
func KernelFind(container string) string {
wwlog.Debug("Finding kernel\n")
wwlog.Debug("Finding kernel")
container_path := RootFsDir(container)
if container_path == "" {
return ""
}
for _, kdir := range kernelDirs {
wwlog.Debug("Checking kernel directory: %s\n", kdir)
wwlog.Debug("Checking kernel directory: %s", kdir)
for _, kname := range kernelNames {
wwlog.Debug("Checking for kernel name: %s\n", kname)
wwlog.Debug("Checking for kernel name: %s", kname)
kernelPaths, err := filepath.Glob(path.Join(container_path, kdir, kname))
if err != nil {
return ""
@@ -47,7 +47,7 @@ func KernelFind(container string) string {
})
for _, kernelPath := range kernelPaths {
wwlog.Debug("Checking for kernel path: %s\n", kernelPath)
wwlog.Debug("Checking for kernel path: %s", kernelPath)
if util.IsFile(kernelPath) {
return kernelPath
}
@@ -59,7 +59,7 @@ func KernelFind(container string) string {
}
func KernelVersion(container string) string {
wwlog.Debug("Finding kernel version inside container: %s\n", container)
wwlog.Debug("Finding kernel version inside container: %s", container)
kernel := KernelFind(container)
if kernel == "" {
return ""