[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Devnode: Fix the pseudo-master device port opening flags.
From: |
Da Zheng |
Subject: |
Re: [PATCH] Devnode: Fix the pseudo-master device port opening flags. |
Date: |
Fri, 25 Dec 2009 17:09:40 +0800 |
User-agent: |
Thunderbird 2.0.0.23 (Macintosh/20090812) |
Sergiu Ivanov wrote:
> * devnode/devnode.c (parse_opt): Open the pseudo-master
> devide port with O_READ | O_WRITE flags to allow subsequent
> device creation.
> ---
>
> Hello,
>
> Originally, devnode would open the pseudo-master device port with 0
> flags. These flags are stored by eth-multiplexer in the peropen
> structure and the subsequent attempt to create a virtual device should
> provide flags forming a subset of the flags stored in the peropen.
> Obviously, if the pseudo-master device port is opened with 0 flags, no
> further meaningful virtual device creation is possible. This patch
> fixes this problem.
>
> Regards,
> Sergiu
>
> ---
> devnode/devnode.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/devnode/devnode.c b/devnode/devnode.c
> index 55fd8d9..8819252 100644
> --- a/devnode/devnode.c
> +++ b/devnode/devnode.c
> @@ -275,7 +275,7 @@ parse_opt (int opt, char *arg, struct argp_state *state)
> switch (opt)
> {
> case 'M':
> - master_device = file_name_lookup (arg, 0, 0);
> + master_device = file_name_lookup (arg, O_READ | O_WRITE, 0);
> if (master_device == MACH_PORT_NULL)
> error (1, errno, "file_name_lookup");
> break;
What happens if .MASTER file is read-only?
Certainly, file_name_lookup in devnode fails. But the questions is: can .MASTER
node be read-only?
Zheng Da
- [PATCH] Devnode: Fix the pseudo-master device port opening flags., Sergiu Ivanov, 2009/12/24
- Re: [PATCH] Devnode: Fix the pseudo-master device port opening flags.,
Da Zheng <=
- Re: [PATCH] Devnode: Fix the pseudo-master device port opening flags., Sergiu Ivanov, 2009/12/25
- Re: [PATCH] Devnode: Fix the pseudo-master device port opening flags., Da Zheng, 2009/12/25
- Re: [PATCH] Devnode: Fix the pseudo-master device port opening flags., Sergiu Ivanov, 2009/12/25
- Re: [PATCH] Devnode: Fix the pseudo-master device port opening flags., Da Zheng, 2009/12/25
- Re: [PATCH] Devnode: Fix the pseudo-master device port opening flags., olafBuddenhagen, 2009/12/26
- Re: [PATCH] Devnode: Fix the pseudo-master device port opening flags., Sergiu Ivanov, 2009/12/30