commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 19/43: libdiskfs: Make mapping the time device more robust.


From: Samuel Thibault
Subject: [hurd] 19/43: libdiskfs: Make mapping the time device more robust.
Date: Mon, 11 Sep 2017 07:10:10 +0000

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

sthibault pushed a commit to branch upstream
in repository hurd.

commit 0a68ce9956efcc286d359907b0e5599eb5a404ec
Author: Justus Winter <address@hidden>
Date:   Sun Aug 6 20:27:03 2017 +0200

    libdiskfs: Make mapping the time device more robust.
    
    * libdiskfs/init-init.c (diskfs_init_diskfs): First try /dev/time,
    then fall back to the Mach device.
---
 libdiskfs/init-init.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/libdiskfs/init-init.c b/libdiskfs/init-init.c
index 357960b..e642c2e 100644
--- a/libdiskfs/init-init.c
+++ b/libdiskfs/init-init.c
@@ -69,14 +69,16 @@ diskfs_init_diskfs (void)
          diskfs_default_pager = MACH_PORT_NULL;
          err = vm_set_default_memory_manager (host, &diskfs_default_pager);
          mach_port_deallocate (mach_task_self (), host);
-
-         if (!err)
-           err = maptime_map (1, 0, &diskfs_mtime);
        }
+      if (err)
+       return err;
     }
-  else
-    err = maptime_map (0, 0, &diskfs_mtime);
 
+  /* First try to use /dev/time...  */
+  err = maptime_map (0, NULL, &diskfs_mtime);
+  if (err)
+    /* ... and fall back to the Mach time device.  */
+    err = maptime_map (1, NULL, &diskfs_mtime);
   if (err)
     return err;
 

-- 
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]