This is an automated email from the git hooks/post-receive script. sthibault pushed a commit to branch upstream in repository hurd.
commit 83fef6c8958377258a764702ddda85f29ba6f3af Author: Samuel Thibault <[email protected]> Date: Tue Nov 7 02:29:55 2017 +0100 Make devprobe able to talk with userland drivers * utils/devprobe.c: Include <fcntl.h> (options): Add "master-device" ('M') option. (main): Handle 'M' option by opening the given filename for `device_master'. --- utils/devprobe.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/utils/devprobe.c b/utils/devprobe.c index d702032..69b15b2 100644 --- a/utils/devprobe.c +++ b/utils/devprobe.c @@ -19,6 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <stdio.h> +#include <fcntl.h> #include <argp.h> #include <hurd.h> @@ -32,6 +33,7 @@ static const struct argp_option options[] = { {"silent", 's', 0, 0, "Don't print devices found"}, {"quiet", 0, 0, OPTION_ALIAS}, {"first", 'f', 0, 0, "Stop after the first device found"}, + {"master-device", 'M', "FILE", 0, "Get a pseudo master device port"}, {0} }; static const char *args_doc = "DEVNAME..."; @@ -66,6 +68,17 @@ main (int argc, char **argv) case 'f': all = 0; break; + case 'M': + if (device_master != MACH_PORT_NULL) + mach_port_deallocate (mach_task_self (), device_master); + + device_master = file_name_lookup (arg, O_READ | O_WRITE, 0); + if (device_master == MACH_PORT_NULL) + argp_failure (state, 3, errno, "Can't open device master port %s", + arg); + + break; + case ARGP_KEY_ARG: if (device_master == MACH_PORT_NULL) { -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hurd/hurd.git
