summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec/errors.rs
diff options
context:
space:
mode:
authorChuck Lever <cel@kernel.org>2026-09-08 09:42:33 -0400
committerChuck Lever <cel@kernel.org>2026-10-04 21:15:29 -0400
commit9ebc61dfe93622ad1fc9d2323e3f9f8819fe142d (patch)
tree4c65360ae4ac7eabfa00b227d635564a4cf08b55 /rust/kernel/alloc/kvec/errors.rs
parent2f5c8429a994e863d30b3eb920edbc5f5b62c2d9 (diff)
xdrgen: Extend the aggregate codec to optional-data list members
The hook-driven aggregate codec emits only the counted-array wire form. XDR list types built on the optional-data idiom ("type *name") carry no count and cannot be expressed that way. NFSv2 READDIR's entry list is one such type. Accept an optional-data member under "pragma aggregate" and emit value-follows framing in place of the counted array. The element type's existing single-node encoder already writes its own value-follows boolean, so the loop calls it once per element and once more with a NULL element to write the terminator. The struct C definitions are untouched; only the marked member's framing changes. The generated decoder fails outright. Decoding a value-follows list needs a presence-reporting element decoder, which this change does not add, and a decoder that consumed nothing would leave the stream at the list data for the next member to misread. NFSv2 READDIR only encodes its entry list, so the decode path is never exercised. Acked-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260908134234.512312-10-cel@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions