From 4359978ef22a22ddd5a19adf18cbc80cb44244fb Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 23 Feb 2023 14:28:18 +0100 Subject: all: ioutil is deprecated in go1.19 (#3718) --- pkg/build/linux.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pkg/build/linux.go') diff --git a/pkg/build/linux.go b/pkg/build/linux.go index bb6e66ef3..112e2dfab 100644 --- a/pkg/build/linux.go +++ b/pkg/build/linux.go @@ -10,7 +10,6 @@ import ( "debug/elf" "encoding/hex" "fmt" - "io/ioutil" "os" "path" "path/filepath" @@ -114,7 +113,7 @@ func (linux linux) buildKernel(params Params) error { } func (linux) createImage(params Params, kernelPath string) error { - tempDir, err := ioutil.TempDir("", "syz-build") + tempDir, err := os.MkdirTemp("", "syz-build") if err != nil { return err } @@ -239,7 +238,7 @@ func LinuxKernelImage(arch string) string { var linuxCompilerRegexp = regexp.MustCompile(`#define\s+LINUX_COMPILER\s+"(.*)"`) func queryLinuxCompiler(kernelDir string) (string, error) { - bytes, err := ioutil.ReadFile(filepath.Join(kernelDir, "include", "generated", "compile.h")) + bytes, err := os.ReadFile(filepath.Join(kernelDir, "include", "generated", "compile.h")) if err != nil { return "", err } -- cgit mrf-deployment