[Top][All Lists]

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

added an error_t to netfs_startup

From: James A Morrison
Subject: added an error_t to netfs_startup
Date: Sat, 9 Mar 2002 17:27:25 -0500 (EST)


  This patch is cosmetic, but it helped me debug since I couldn't get
gdb to print errno, where it would print error.

  Is this the better way to return the error?  If yes, I will go through
the rest of the hurd source looking for similar situations and fix them
as well.

2002-03-9  James A. Morrison <ja2morri@uwaterloo.ca>

        * init-startup: Changed errno to err.

Index: init-startup.c
RCS file: /cvsroot/hurd/hurd/libnetfs/init-startup.c,v
retrieving revision 1.4
diff -u -r1.4 init-startup.c
--- init-startup.c      17 Mar 2000 17:21:45 -0000      1.4
+++ init-startup.c      9 Mar 2002 19:49:15 -0000
@@ -26,24 +26,25 @@
 netfs_startup (mach_port_t bootstrap, int flags)
+  error_t err;
   mach_port_t realnode, right;
   struct port_info *newpi;
   if (bootstrap == MACH_PORT_NULL)
     error (10, 0, "Must be started as a translator");
-  errno = ports_create_port (netfs_control_class, netfs_port_bucket,
+  err = ports_create_port (netfs_control_class, netfs_port_bucket,
                             sizeof (struct port_info), &newpi);
-  if (!errno)
+  if (!err)
       right = ports_get_send_right (newpi);
-      errno = fsys_startup (bootstrap, flags, right, MACH_MSG_TYPE_COPY_SEND,
+      err = fsys_startup (bootstrap, flags, right, MACH_MSG_TYPE_COPY_SEND,
       mach_port_deallocate (mach_task_self (), right);
       ports_port_deref (newpi);
-  if (errno)
-    error (11, errno, "Translator startup failure: fsys_startup");
+  if (err)
+    error (11, err, "Translator startup failure: fsys_startup");
   mach_port_deallocate (mach_task_self (), bootstrap);

reply via email to

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