minix/lib/libc/sys-minix/loadname.c
Lionel Sambuc cef3ce969a 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-07-28 17:05:33 +02:00

19 lines
504 B
C

#include <sys/cdefs.h>
#include <lib.h>
#include "namespace.h"
#include <string.h>
void _loadname(const char *name, message *msgptr)
{
/* 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;
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);
}