| 666 | } |
| 667 | |
| 668 | static int |
| 669 | ifc_simple_match(struct if_clone *ifc, const char *name) |
| 670 | { |
| 671 | const char *cp; |
| 672 | int i; |
| 673 | |
| 674 | /* Match the name */ |
| 675 | for (cp = name, i = 0; i < strlen(ifc->ifc_name); i++, cp++) { |
| 676 | if (ifc->ifc_name[i] != *cp) |
| 677 | return (0); |
| 678 | } |
| 679 | |
| 680 | /* Make sure there's a unit number or nothing after the name */ |
| 681 | for (; *cp != '\0'; cp++) { |
| 682 | if (*cp < '0' || *cp > '9') |
| 683 | return (0); |
| 684 | } |
| 685 | |
| 686 | return (1); |
| 687 | } |
| 688 | |
| 689 | static int |
| 690 | ifc_simple_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) |
no outgoing calls
no test coverage detected