Skip to content

Commit

Permalink
chore: minor fixes
Browse files Browse the repository at this point in the history
`btrfs` was missing from `Makefile`.
Use `os` package instead of deprecated `io/ioutil`.

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Aug 17, 2023
1 parent 1533478 commit 0284425
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ space = $(empty) $(empty)
TARGETS = \
amd-ucode \
bnx2-bnx2x \
btrfs \
drbd \
gasket-driver \
gvisor \
Expand Down
3 changes: 1 addition & 2 deletions storage/iscsi-tools/iscsid-wrapper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
Expand All @@ -30,7 +29,7 @@ func main() {
initiatorName := fmt.Sprintf("InitiatorName=%s", cmdOut.String())
log.Printf("iscsid-wrapper: writing %s to /etc/iscsi/initiatorname.iscsi", initiatorName)

if err := ioutil.WriteFile("/etc/iscsi/initiatorname.iscsi", []byte(initiatorName), 0o644); err != nil {
if err := os.WriteFile("/etc/iscsi/initiatorname.iscsi", []byte(initiatorName), 0o644); err != nil {
log.Printf("iscsi-iname: error saving iscsi initiatorname %v\n", err)
}
}
Expand Down

0 comments on commit 0284425

Please sign in to comment.