linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtnetlink.3: tfix
@ 2016-09-05  6:54 HuKeping
       [not found] ` <1473058499-23820-1-git-send-email-hukeping-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: HuKeping @ 2016-09-05  6:54 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, hukeping-hv44wF8Li93QT0dZR+AlfA,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, daniel-FeC+5ew28dpmcu3hnIyYJQ,
	herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q,
	chamaken-Re5JQEeQqe8AvxtiuMwx3w, pablo-Cap9r6Oaw4JrovVCs/uTlw,
	fw-HFFVJYpyMKqzQB+pC5nmwQ,
	elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f

It seems that the structure in this example doesn't
have a field named n.

Signed-off-by: Hu Keping <hukeping-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
 man3/rtnetlink.3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man3/rtnetlink.3 b/man3/rtnetlink.3
index 143be57..430206d 100644
--- a/man3/rtnetlink.3
+++ b/man3/rtnetlink.3
@@ -113,7 +113,7 @@ Creating a rtnetlink message to set the MTU of a device:
                              NLMSG_ALIGN(req.nh.nlmsg_len));
     rta\->rta_type = IFLA_MTU;
     rta\->rta_len = RTA_LENGTH(sizeof(unsigned int));
-    req.n.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) +
+    req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) +
                                   RTA_LENGTH(sizeof(mtu));
     memcpy(RTA_DATA(rta), &mtu, sizeof(mtu));
     send(rtnetlink_sk, &req, req.nh.nlmsg_len, 0);
-- 
2.8.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rtnetlink.3: tfix
       [not found] ` <1473058499-23820-1-git-send-email-hukeping-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2016-09-05  9:05   ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2016-09-05  9:05 UTC (permalink / raw)
  To: HuKeping
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	linux-man-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	daniel-FeC+5ew28dpmcu3hnIyYJQ,
	herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q,
	chamaken-Re5JQEeQqe8AvxtiuMwx3w, pablo-Cap9r6Oaw4JrovVCs/uTlw,
	fw-HFFVJYpyMKqzQB+pC5nmwQ,
	elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f

Hello Hu Keping,
 
On 09/05/2016 06:54 PM, HuKeping wrote:
> It seems that the structure in this example doesn't
> have a field named n.

Thanks. Patch applied.

Cheers,

Michael


> Signed-off-by: Hu Keping <hukeping-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> ---
>  man3/rtnetlink.3 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man3/rtnetlink.3 b/man3/rtnetlink.3
> index 143be57..430206d 100644
> --- a/man3/rtnetlink.3
> +++ b/man3/rtnetlink.3
> @@ -113,7 +113,7 @@ Creating a rtnetlink message to set the MTU of a device:
>                               NLMSG_ALIGN(req.nh.nlmsg_len));
>      rta\->rta_type = IFLA_MTU;
>      rta\->rta_len = RTA_LENGTH(sizeof(unsigned int));
> -    req.n.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) +
> +    req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) +
>                                    RTA_LENGTH(sizeof(mtu));
>      memcpy(RTA_DATA(rta), &mtu, sizeof(mtu));
>      send(rtnetlink_sk, &req, req.nh.nlmsg_len, 0);
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-05  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-05  6:54 [PATCH] rtnetlink.3: tfix HuKeping
     [not found] ` <1473058499-23820-1-git-send-email-hukeping-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-09-05  9:05   ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).