mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 13:48:21 +00:00
netdev: netdev_from_minor
This commit is contained in:
@@ -246,6 +246,10 @@ static devops_t devops = {
|
||||
.ioctl = netdev_ioctl
|
||||
};
|
||||
|
||||
netdev_t *netdev_from_minor(uint16_t minor) {
|
||||
return minors[minor];
|
||||
}
|
||||
|
||||
int netdev_register(netdev_t *netdev, char *name) {
|
||||
// TODO: better allocation strategy (copy wlan's?)
|
||||
int minor = __atomic_fetch_add(¤t_minor, 1, __ATOMIC_RELAXED);
|
||||
|
||||
Reference in New Issue
Block a user