Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
uevent: Store the interface field as device name for network interfaces
Browse files Browse the repository at this point in the history
In case of metwork interfaces, the interface name is provided
as "INTERFACE" field. Use this as the device name.

Signed-off-by: Archana Shinde <[email protected]>
  • Loading branch information
amshinde committed Aug 28, 2018
1 parent 3ff9753 commit c9a4e2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/uevent/uevent.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const (
uEventSubSystem = "SUBSYSTEM"
uEventSeqNum = "SEQNUM"
uEventDevName = "DEVNAME"
uEventInterface = "INTERFACE"

paramDelim = 0x00
)
Expand Down Expand Up @@ -133,6 +134,10 @@ func (h *Handler) Read() (*Uevent, error) {
uEv.SubSystem = val
case uEventDevName:
uEv.DevName = val
case uEventInterface:
// In case of network interfaces, DevName will be empty since a device node
// is not created. Instead store the "INTERFACE" field as devName
uEv.DevName = val
case uEventSeqNum:
uEv.SeqNum = val

Expand Down

0 comments on commit c9a4e2e

Please sign in to comment.