ソースを参照

[ecm] Display invalid MAC address strings in debug messages

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7年前
コミット
c8cb867d65
1個のファイルの変更6行の追加1行の削除
  1. 6
    1
      src/drivers/net/ecm.c

+ 6
- 1
src/drivers/net/ecm.c ファイルの表示

101
 	}
101
 	}
102
 
102
 
103
 	/* Sanity check */
103
 	/* Sanity check */
104
-	if ( len != ( ( int ) ( sizeof ( buf ) - 1 /* NUL */ ) ) )
104
+	if ( len != ( ( int ) ( sizeof ( buf ) - 1 /* NUL */ ) ) ) {
105
+		DBGC ( usb, "USB %s has invalid ECM MAC \"%s\"\n",
106
+		       usb->name, buf );
105
 		return -EINVAL;
107
 		return -EINVAL;
108
+	}
106
 
109
 
107
 	/* Decode MAC address */
110
 	/* Decode MAC address */
108
 	len = base16_decode ( buf, hw_addr, ETH_ALEN );
111
 	len = base16_decode ( buf, hw_addr, ETH_ALEN );
109
 	if ( len < 0 ) {
112
 	if ( len < 0 ) {
110
 		rc = len;
113
 		rc = len;
114
+		DBGC ( usb, "USB %s could not decode ECM MAC \"%s\": %s\n",
115
+		       usb->name, buf, strerror ( rc ) );
111
 		return rc;
116
 		return rc;
112
 	}
117
 	}
113
 
118
 

読み込み中…
キャンセル
保存