Re: [PATCH 4/4] rpcinfo: try connecting using abstract address.

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

 



Hi Neil, Steve,

...
>    sun.sun_family = AF_LOCAL;
> +
> +#ifdef _PATH_RPCBINDSOCK_ABSTRACT
> +  memcpy(sun.sun_path, _PATH_RPCBINDSOCK_ABSTRACT,
> +         sizeof(_PATH_RPCBINDSOCK_ABSTRACT));
> +  nbuf.len = SUN_LEN_A (&sun);
> +  nbuf.maxlen = sizeof (struct sockaddr_un);
> +  nbuf.buf = &sun;
> +
> +  clnt = clnt_vc_create (sock, &nbuf, prog, vers, 0, 0);
> +  if (clnt)
> +    return clnt;
> +#endif
> +
>    strcpy (sun.sun_path, _PATH_RPCBINDSOCK);
>    nbuf.len = SUN_LEN (&sun);
>    nbuf.maxlen = sizeof (struct sockaddr_un);
>    nbuf.buf = &sun;

> -  return clnt_vc_create (sock, &nbuf, prog, vers, 0, 0);
> +  clnt = clnt_vc_create (sock, &nbuf, prog, vers, 0, 0);
> +  return clnt;
nit: maybe keeping the original:
	 return clnt_vc_create (sock, &nbuf, prog, vers, 0, 0);

Otherwise LGTM.

Reviewed-by: Petr Vorel <pvorel@xxxxxxx>

Also it might be worth to remove '#if 0' part.

Kind regards,
Petr




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux