1 #include <sys/cdefs.h> 2 #include <lib.h> 3 #include "namespace.h" 4 5 #include <string.h> 6 7 void _loadname(const char *name, message *msgptr) 8 { 9 /* This function is used to load a string into a type m3 message. If the 10 * string fits in the message, it is copied there. If not, a pointer to 11 * it is passed. 12 */ 13 register size_t k; 14 15 k = strlen(name) + 1; 16 msgptr->m_lc_vfs_path.len = k; 17 msgptr->m_lc_vfs_path.name = (vir_bytes)name; 18 if (k <= M_PATH_STRING_MAX) strcpy(msgptr->m_lc_vfs_path.buf, name); 19 } 20