[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Define IO_OUTTRAN so that term_on_pty returns a mach_port_t
From: |
Flavio Cruz |
Subject: |
[PATCH] Define IO_OUTTRAN so that term_on_pty returns a mach_port_t |
Date: |
Thu, 31 Dec 2015 16:12:59 +0100 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
* libtrivfs/mig-decls.h: Implement trivfs_convert_to_port.
* term/mig-mutate.h: Define IO_OUTTRAN.
---
diff --git a/libtrivfs/mig-decls.h b/libtrivfs/mig-decls.h
index 230af23..f3afd5a 100644
--- a/libtrivfs/mig-decls.h
+++ b/libtrivfs/mig-decls.h
@@ -75,6 +75,12 @@ trivfs_end_using_protid (struct trivfs_protid *cred)
ports_port_deref (cred);
}
+static inline mach_port_t __attribute__ ((unused))
+trivfs_convert_to_port(struct trivfs_protid *protid)
+{
+ return protid->pi.port_right;
+}
+
static inline struct trivfs_control * __attribute__ ((unused))
trivfs_begin_using_control (mach_port_t port)
{
diff --git a/term/mig-mutate.h b/term/mig-mutate.h
index af8877e..9fcdbbc 100644
--- a/term/mig-mutate.h
+++ b/term/mig-mutate.h
@@ -22,6 +22,7 @@
#define IO_INTRAN trivfs_protid_t trivfs_begin_using_protid (io_t)
#define IO_INTRAN_PAYLOAD trivfs_protid_t trivfs_begin_using_protid_payload
#define IO_DESTRUCTOR trivfs_end_using_protid (trivfs_protid_t)
+#define IO_OUTTRAN io_t trivfs_convert_to_port (trivfs_protid_t)
#define CTTY_INTRAN \
port_info_t begin_using_ctty_port (mach_port_t)
- [PATCH] Define IO_OUTTRAN so that term_on_pty returns a mach_port_t,
Flavio Cruz <=