2011-02-17 18:11:09 +01:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include <lib.h>
|
|
|
|
#include "namespace.h"
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
2011-11-28 11:07:55 +01:00
|
|
|
void _loadname(const char *name, message *msgptr)
|
2011-02-17 18:11:09 +01:00
|
|
|
{
|
|
|
|
/* This function is used to load a string into a type m3 message. If the
|
|
|
|
* string fits in the message, it is copied there. If not, a pointer to
|
|
|
|
* it is passed.
|
|
|
|
*/
|
|
|
|
register size_t k;
|
|
|
|
|
|
|
|
k = strlen(name) + 1;
|
Message type for path related calls.
- Updated system calls VFS_ACCESS, VFS_CHDIR, VFS_CHMOD, VFS_CHROOT,
VFS_MKDIR, VFS_OPEN, VFS_RMDIR, VSF_UNLINK
- Removed M3_STRING and M3_LONG_STRING, which are tied to a specific
"generic" message, and replaced where needed with M_PATH_STRING_MAX,
which is tied to the mess_lc_vfs_path message.
Change-Id: If287c74f5ece937b9431e5d95b5b58a3c83ebff1
2014-05-12 16:30:43 +02:00
|
|
|
msgptr->m_lc_vfs_path.len = k;
|
|
|
|
msgptr->m_lc_vfs_path.name = (vir_bytes)name;
|
|
|
|
if (k <= M_PATH_STRING_MAX) strcpy(msgptr->m_lc_vfs_path.buf, name);
|
2011-02-17 18:11:09 +01:00
|
|
|
}
|