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