WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] minios: Use posix_openpt() rather than no

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] minios: Use posix_openpt() rather than non-standard openpty().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Jun 2009 00:56:31 -0700
Delivery-date: Fri, 19 Jun 2009 01:08:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] minios: Use posix_openpt() rather than non-standard openpty()., Xen patchbot-unstable <=