Fix error messages

This commit is contained in:
Daniel Lorch 2025-05-15 09:16:34 +02:00 committed by GitHub
parent 91766550cd
commit ecef1ea08a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -19,11 +19,11 @@ func initUsbEthernet(gadget *usbgadget.UsbGadget) error {
scopedLogger.Info().Msg("enabling USB Ethernet")
if err := exec.Command("ip", "addr", "add", ipv4addr, "dev", iface).Run(); err != nil {
return fmt.Errorf("failed to flush table nat: %w", err)
return fmt.Errorf("failed to add ip addr: %w", err)
}
if err := exec.Command("ip", "link", "set", "dev", iface, "up").Run(); err != nil {
return fmt.Errorf("failed to flush table nat: %w", err)
return fmt.Errorf("failed to set ip link: %w", err)
}
return nil