Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_conf.c
Show First 20 Lines • Show All 1,249 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
int | int | ||||
dev_stdclone(char *name, char **namep, const char *stem, int *unit) | dev_stdclone(char *name, char **namep, const char *stem, int *unit) | ||||
{ | { | ||||
int u, i; | int u, i; | ||||
i = strlen(stem); | i = strlen(stem); | ||||
if (bcmp(stem, name, i) != 0) | if (strncmp(stem, name, i) != 0) | ||||
return (0); | return (0); | ||||
if (!isdigit(name[i])) | if (!isdigit(name[i])) | ||||
return (0); | return (0); | ||||
u = 0; | u = 0; | ||||
if (name[i] == '0' && isdigit(name[i+1])) | if (name[i] == '0' && isdigit(name[i+1])) | ||||
return (0); | return (0); | ||||
while (isdigit(name[i])) { | while (isdigit(name[i])) { | ||||
u *= 10; | u *= 10; | ||||
▲ Show 20 Lines • Show All 312 Lines • Show Last 20 Lines |