From e44471d1d03c8adb4f0a8fe85204507e51e3218c Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Tue, 8 Sep 2026 11:16:13 -0400 Subject: [PATCH] xdrgen: Document that aggregate members of a struct share an element type check_aggregate_directives() rejects a second marked member whose element type differs from the first, because one hook set serves every marked member of a struct and its item hook takes a single element type. The README says the members share a hook set but never states the restriction that follows from it, so a spec author learns of it only from the diagnostic. State the restriction where the shared hook set is described. Signed-off-by: Chuck Lever --- tools/net/sunrpc/xdrgen/README | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/net/sunrpc/xdrgen/README b/tools/net/sunrpc/xdrgen/README index 9f9a4d8bc7ae..240d496c6a1e 100644 --- a/tools/net/sunrpc/xdrgen/README +++ b/tools/net/sunrpc/xdrgen/README @@ -201,8 +201,10 @@ For example: The hooks are supplied by hand. Their names derive from the pragma header and the containing struct, so that two programs sharing a type name resolve to distinct symbols. All marked members of one -struct share a hook set; the cursor's member_id field selects the -member: +struct share a hook set, so they share one element type as well; +xdrgen rejects a marked member whose element type differs from +that of a member already marked in the same struct. The cursor's +member_id field selects the member: nfs_acl2_secattr_encode_begin() nfs_acl2_secattr_encode()