. service tells you which device it couldn't stat
[minix3.git] / lib / other / strdup.c
blob62969cbaa6084688b26b046a03c7c53bbeab99a9
1 /*
2 lib/other/strdup.c
3 */
5 #include <stdlib.h>
6 #include <string.h>
8 char *strdup(s1)
9 const char *s1;
11 size_t len;
12 char *s2;
14 len= strlen(s1)+1;
16 s2= malloc(len);
17 if (s2 == NULL)
18 return NULL;
19 strcpy(s2, s1);
21 return s2;