File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import (
1313
1414var (
1515 regexAddress * regexp.Regexp = regexp .MustCompile (
16- `^(([0-9a-f]{0,4 }):)?([0-9a-f]{2}):([0-9a-f]{2})\.([0-9a-f]{1})$` ,
16+ `^(([0-9a-f]{0,8 }):)?([0-9a-f]{2}):([0-9a-f]{2})\.([0-9a-f]{1})$` ,
1717 )
1818)
1919
@@ -30,12 +30,11 @@ func (addr *Address) String() string {
3030 return addr .Domain + ":" + addr .Bus + ":" + addr .Device + "." + addr .Function
3131}
3232
33- // FromString returns an Address struct from an ddress string in either
34- // $BUS:$DEVICE.$FUNCTION (BDF) format or it can be a full PCI address that
35- // includes the 4-digit $DOMAIN information as well:
36- // $DOMAIN:$BUS:$DEVICE.$FUNCTION.
33+ // FromString returns [Address] from an address string in either
34+ // $BUS:$DEVICE.$FUNCTION (BDF) format or a full PCI address that
35+ // includes the $DOMAIN: $DOMAIN:$BUS:$DEVICE.$FUNCTION.
3736//
38- // Returns "" if the address string wasn 't a valid PCI address.
37+ // If the address string isn 't a valid PCI address, then nil is returned .
3938func FromString (address string ) * Address {
4039 addrLowered := strings .ToLower (address )
4140 matches := regexAddress .FindStringSubmatch (addrLowered )
You can’t perform that action at this time.
0 commit comments