misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
Simone Margaritelli 2021-04-09 00:14:52 +02:00
parent d5fb7b6754
commit 3c506b7809
6 changed files with 9 additions and 10 deletions

View file

@ -41,7 +41,7 @@ func SetInterfaceChannel(iface string, channel int) error {
}
if core.HasBinary("iw") {
Debug("SetInterfaceChannel(%s, %d) iw based", iface, channel)
// Debug("SetInterfaceChannel(%s, %d) iw based", iface, channel)
out, err := core.Exec("iw", []string{"dev", iface, "set", "channel", fmt.Sprintf("%d", channel)})
if err != nil {
return fmt.Errorf("iw: out=%s err=%s", out, err)
@ -49,7 +49,7 @@ func SetInterfaceChannel(iface string, channel int) error {
return fmt.Errorf("Unexpected output while setting interface %s to channel %d: %s", iface, channel, out)
}
} else if core.HasBinary("iwconfig") {
Debug("SetInterfaceChannel(%s, %d) iwconfig based")
// Debug("SetInterfaceChannel(%s, %d) iwconfig based")
out, err := core.Exec("iwconfig", []string{iface, "channel", fmt.Sprintf("%d", channel)})
if err != nil {
return fmt.Errorf("iwconfig: out=%s err=%s", out, err)