mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
xdrgen: XDR width for optional_data type
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
2db8940e6c
commit
dc6fa83b6a
@ -245,9 +245,19 @@ class _XdrOptionalData(_XdrDeclaration):
|
||||
spec: _XdrTypeSpecifier
|
||||
template: str = "optional_data"
|
||||
|
||||
def max_width(self) -> int:
|
||||
"""Return width of type in XDR_UNITS"""
|
||||
return 1
|
||||
|
||||
def symbolic_width(self) -> List:
|
||||
"""Return list containing XDR width of type's components"""
|
||||
return ["XDR_bool"]
|
||||
|
||||
def __post_init__(self):
|
||||
structs.add(self.name)
|
||||
pass_by_reference.add(self.name)
|
||||
max_widths[self.name] = self.max_width()
|
||||
symbolic_widths[self.name] = self.symbolic_width()
|
||||
|
||||
|
||||
@dataclass
|
||||
|
Loading…
Reference in New Issue
Block a user