[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] minios: Use posix_openpt() rather than non-standard openpty().
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1245316765 -3600 # Node ID 01ad2654815ad69476504a01b8141d95c351524f # Parent cf6d3211ec5982a6669ebf56b664e932ba0a7a46 minios: Use posix_openpt() rather than non-standard openpty(). Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> --- extras/mini-os/include/lib.h | 1 - extras/mini-os/lib/sys.c | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff -r cf6d3211ec59 -r 01ad2654815a extras/mini-os/include/lib.h --- a/extras/mini-os/include/lib.h Thu Jun 18 10:18:10 2009 +0100 +++ b/extras/mini-os/include/lib.h Thu Jun 18 10:19:25 2009 +0100 @@ -101,7 +101,6 @@ char *strdup(const char *s); char *strdup(const char *s); #endif #include <mini-os/console.h> -int openpty(void); #define RAND_MIX 2654435769U diff -r cf6d3211ec59 -r 01ad2654815a extras/mini-os/lib/sys.c --- a/extras/mini-os/lib/sys.c Thu Jun 18 10:18:10 2009 +0100 +++ b/extras/mini-os/lib/sys.c Thu Jun 18 10:19:25 2009 +0100 @@ -167,15 +167,17 @@ int mkdir(const char *pathname, mode_t m return 0; } -int openpty(void) +int posix_openpt(int flags) { struct consfront_dev *dev; + + /* Ignore flags */ dev = init_consfront(NULL); dev->fd = alloc_fd(FTYPE_CONSOLE); files[dev->fd].cons.dev = dev; - printk("fd(%d) = openpty\n", dev->fd); + printk("fd(%d) = posix_openpt\n", dev->fd); return(dev->fd); } @@ -188,6 +190,8 @@ int open(const char *pathname, int flags printk("open(%s) -> %d\n", pathname, fd); return fd; } + if (!strncmp(pathname, "/dev/ptmx", strlen("/dev/ptmx"))) + return posix_openpt(flags); printk("open(%s, %x)", pathname, flags); switch (flags & ~O_ACCMODE) { case 0: @@ -1341,6 +1345,9 @@ unsupported_function_crash(sysconf); unsupported_function_crash(sysconf); unsupported_function(int, tcsetattr, -1); unsupported_function(int, tcgetattr, 0); +unsupported_function(int, grantpt, -1); +unsupported_function(int, unlockpt, -1); +unsupported_function(char *, ptsname, NULL); unsupported_function(int, poll, -1); /* net/if.h */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |