MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ifc_alloc_unit_next

Function ifc_alloc_unit_next

freebsd/net/if_clone.c:630–649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

628}
629
630static int
631ifc_alloc_unit_next(struct if_clone *ifc, int *unit)
632{
633 int error;
634
635 *unit = alloc_unr(ifc->ifc_unrhdr);
636 if (*unit == -1)
637 return (ENOSPC);
638
639 free_unr(ifc->ifc_unrhdr, *unit);
640 for (;;) {
641 error = ifc_alloc_unit_specific(ifc, unit);
642 if (error != EEXIST)
643 break;
644
645 (*unit)++;
646 }
647
648 return (error);
649}
650
651int
652ifc_alloc_unit(struct if_clone *ifc, int *unit)

Callers 1

ifc_alloc_unitFunction · 0.85

Calls 3

alloc_unrFunction · 0.85
free_unrFunction · 0.85
ifc_alloc_unit_specificFunction · 0.85

Tested by

no test coverage detected