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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [uClibc/] [test/] [stdlib/] [ptytest.c] - Blame information for rev 1325

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

Line No. Rev Author Line
1 1325 phoenix
#define _XOPEN_SOURCE
2
#include <sys/types.h>
3
#include <sys/stat.h>
4
#include <fcntl.h>
5
#include <stdio.h>
6
#include <stdlib.h>
7
 
8
int main()
9
{
10
    int fd;
11
    char *cp;
12
 
13
    fd=open("/dev/ptmx",O_NOCTTY|O_RDWR);
14
    cp=ptsname(fd);
15
    if (cp==NULL)
16
        return EXIT_FAILURE;
17
    printf("ptsname %s\n",cp);
18
    return EXIT_SUCCESS;
19
}
20
 

powered by: WebSVN 2.1.0

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