. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git] / lib / other / loadname.c
blob1329b26747f66261bafe177e142cc0252b21154b
1 #include <lib.h>
2 #include <string.h>
4 PUBLIC void _loadname(name, msgptr)
5 _CONST char *name;
6 message *msgptr;
8 /* This function is used to load a string into a type m3 message. If the
9 * string fits in the message, it is copied there. If not, a pointer to
10 * it is passed.
13 register size_t k;
15 k = strlen(name) + 1;
16 msgptr->m3_i1 = k;
17 msgptr->m3_p1 = (char *) name;
18 if (k <= sizeof msgptr->m3_ca1) strcpy(msgptr->m3_ca1, name);