OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [linux/] [uClibc/] [libutil/] [login.c] - Rev 1325

Go to most recent revision | Compare with Previous | Blame | View Log

#include <errno.h>
#include <limits.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <utmp.h>
 
/* Write the given entry into utmp and wtmp.  */
void login (const struct utmp *entry)
{
    struct utmp copy = *entry;
 
    utmpname(_PATH_UTMP);
    setutent();
#if _HAVE_UT_TYPE - 0 
    copy.ut_type = USER_PROCESS;
#endif  
#if _HAVE_UT_PID - 0
    copy.ut_pid = getpid();
#endif
    strncpy (copy.ut_line, entry->ut_line, UT_LINESIZE);
    pututline(entry);
    endutent();
}
 
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.