Re: [PATCH] Use errno instead of having unknown error

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

 



On Thu, 19 Jul 2012 11:38:28 +0200
Luk Claes <luk@xxxxxxxxxx> wrote:

> When access() fails, use errno for a sensible error message.
> 
> Signed-off-by: Luk Claes <luk@xxxxxxxxxx>
> ---
>  mount.cifs.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mount.cifs.c b/mount.cifs.c
> index 6f3f382..f47f416 100644
> --- a/mount.cifs.c
> +++ b/mount.cifs.c
> @@ -590,6 +590,7 @@ static int open_cred_file(char *file_name,
>  	i = access(file_name, R_OK);
>  	if (i) {
>  		toggle_dac_capability(0, 0);
> +		i = errno;
>  		goto return_i;
>  	}
>  

Looks correct.

Thanks!
-- 
Jeff Layton <jlayton@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux