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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [uClibc/] [test/] [stdlib/] [ptytest.c] - Rev 1765

Compare with Previous | Blame | View Log

#define _XOPEN_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
 
int main()
{
    int fd;
    char *cp;
 
    fd=open("/dev/ptmx",O_NOCTTY|O_RDWR);
    cp=ptsname(fd);
    if (cp==NULL)
	return EXIT_FAILURE;
    printf("ptsname %s\n",cp);
    return EXIT_SUCCESS;
}
 
 

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.