[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 09/17: devnode: fix falling back to the kernel driver
From: |
Samuel Thibault |
Subject: |
[hurd] 09/17: devnode: fix falling back to the kernel driver |
Date: |
Mon, 15 Feb 2016 09:10:03 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 987084c1cc955c4368e216e27a3c21de1d524bbf
Author: Justus Winter <address@hidden>
Date: Sat Jan 2 19:18:40 2016 +0100
devnode: fix falling back to the kernel driver
* devnode/devnode.c (ds_device_open): Do not exit if opening the
master device fails.
(parse_opt): Likewise.
---
devnode/devnode.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/devnode/devnode.c b/devnode/devnode.c
index 2802471..a5120d7 100644
--- a/devnode/devnode.c
+++ b/devnode/devnode.c
@@ -153,12 +153,20 @@ ds_device_open (mach_port_t master_port, mach_port_t
reply_port,
if (master_file != NULL)
{
- if (master_device != MACH_PORT_NULL)
+ mach_port_t md;
+ if (MACH_PORT_VALID (master_device))
mach_port_deallocate (mach_task_self (), master_device);
-
- master_device = file_name_lookup (master_file, 0, 0);
- if (master_device == MACH_PORT_NULL)
- error (1, errno, "file_name_lookup");
+ md = file_name_lookup (master_file, 0, 0);
+ if (MACH_PORT_VALID (md))
+ master_device = md;
+ else
+ {
+ error (0, 0, "%s: %s.\nFalling back to kernel driver.",
+ master_file, strerror (errno));
+ err = get_privileged_ports (0, &master_device);
+ if (err)
+ return err;
+ }
}
err = device_open (master_device, mode, device_name, device);
@@ -298,7 +306,8 @@ parse_opt (int opt, char *arg, struct argp_state *state)
master_file = arg;
master_device = file_name_lookup (arg, 0, 0);
if (master_device == MACH_PORT_NULL)
- error (1, errno, "file_name_lookup");
+ error (0, 0, "%s: %s.\nFalling back to kernel driver.",
+ arg, strerror (errno));
break;
case 'n':
user_device_name = arg;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (0aa179e -> ffaff64), Samuel Thibault, 2016/02/15
- [hurd] 03/17: procfs: Move setting default parameters to a separate function, Samuel Thibault, 2016/02/15
- [hurd] 11/17: Fixed leaks in _netfs_translator_callback2_fn, Samuel Thibault, 2016/02/15
- [hurd] 04/17: exec: remove duplicate function call, Samuel Thibault, 2016/02/15
- [hurd] 02/17: Fix typo, Samuel Thibault, 2016/02/15
- [hurd] 16/17: Fix function name, Samuel Thibault, 2016/02/15
- [hurd] 14/17: Make sure to complete auth_server_authenticate, Samuel Thibault, 2016/02/15
- [hurd] 15/17: Fix hang on reauthentication, Samuel Thibault, 2016/02/15
- [hurd] 05/17: utils/settrans: improve --chroot functionality, Samuel Thibault, 2016/02/15
- [hurd] 08/17: mach-defpager: link dynamically, Samuel Thibault, 2016/02/15
- [hurd] 09/17: devnode: fix falling back to the kernel driver,
Samuel Thibault <=
- [hurd] 01/17: Also build exec.static, Samuel Thibault, 2016/02/15
- [hurd] 12/17: utils/vmallocate: new utility, Samuel Thibault, 2016/02/15
- [hurd] 17/17: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2016/02/15
- [hurd] 06/17: Use refcount_t for peropen reference counting in libnetfs., Samuel Thibault, 2016/02/15
- [hurd] 07/17: Remove libfshelp/trans.h and libfshelp/locks.h., Samuel Thibault, 2016/02/15
- [hurd] 10/17: Check for a return value in netfs_make_peropen before using it in netfs_make_protid., Samuel Thibault, 2016/02/15
- [hurd] 13/17: Use libihash to store directory entries in ftpfs., Samuel Thibault, 2016/02/15