commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 18/25: libmachdev: fix device_open


From: Samuel Thibault
Subject: [hurd] 18/25: libmachdev: fix device_open
Date: Tue, 27 May 2014 08:32:03 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch dde
in repository hurd.

commit 339d3c27837ef4a220ea4f843cfa0ad1cbd2571b
Author: Justus Winter <address@hidden>
Date:   Sun Apr 13 12:02:55 2014 +0200

    libmachdev: fix device_open
    
    device_open used to explicitly call ds_device_open_reply instead of
    just letting the mig-generated wrapper around ds_device_open generate
    the return message.  There is really no need for that.
    
    * libmachdev/net.c: Do not include device_reply_U.h.
    (device_open): Do not call ds_device_open_reply.
    Set *devicePoly to MACH_MSG_TYPE_MAKE_SEND.
---
 libmachdev/ds_routines.c |  1 -
 libmachdev/net.c         | 13 ++++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c
index 0e431a3..44f1139 100644
--- a/libmachdev/ds_routines.c
+++ b/libmachdev/ds_routines.c
@@ -64,7 +64,6 @@
 
 #include "vm_param.h"
 #include "device_S.h"
-#include "device_reply_U.h"
 #include "io_req.h"
 #include "dev_hdr.h"
 #include "util.h"
diff --git a/libmachdev/net.c b/libmachdev/net.c
index 501c9bb..300d946 100644
--- a/libmachdev/net.c
+++ b/libmachdev/net.c
@@ -368,15 +368,14 @@ device_open (mach_port_t reply_port, mach_msg_type_name_t 
reply_port_type,
            dev->set_multicast_list (dev);
 #endif
        }
-      if (MACH_PORT_VALID (reply_port))
-       ds_device_open_reply (reply_port, reply_port_type,
-                             err, dev_to_port (nd));
-      return MIG_NO_REPLY;
     }
 
-  *devp = ports_get_right (nd);
-  *devicePoly = MACH_MSG_TYPE_COPY_SEND;
-  return D_SUCCESS;
+  if (nd)
+    {
+      *devp = ports_get_right (nd);
+      *devicePoly = MACH_MSG_TYPE_MAKE_SEND;
+    }
+  return err;
 }
 
 static io_return_t

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]