fs/lockd/nlm4xdr_gen.c

Source file repositories/reference/linux-study-clean/fs/lockd/nlm4xdr_gen.c

File Facts

System
Linux kernel
Corpus path
fs/lockd/nlm4xdr_gen.c
Extension
.c
Size
18902 bytes
Lines
725
Domain
Core OS
Bucket
VFS And Filesystem Core
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0
// Generated by xdrgen. Manual edits will be lost.
// XDR specification file: ../../Documentation/sunrpc/xdr/nlm4.x
// XDR specification modification time: Thu Dec 25 13:10:19 2025

#include <linux/sunrpc/svc.h>

#include "nlm4xdr_gen.h"

static bool __maybe_unused
xdrgen_decode_netobj(struct xdr_stream *xdr, netobj *ptr)
{
	return xdrgen_decode_opaque(xdr, ptr, MAXNETOBJ_SZ);
}

static bool __maybe_unused
xdrgen_decode_fsh4_mode(struct xdr_stream *xdr, fsh4_mode *ptr)
{
	u32 val;

	if (xdr_stream_decode_u32(xdr, &val) < 0)
		return false;
	*ptr = val;
	return true;
}

static bool __maybe_unused
xdrgen_decode_fsh4_access(struct xdr_stream *xdr, fsh4_access *ptr)
{
	u32 val;

	if (xdr_stream_decode_u32(xdr, &val) < 0)
		return false;
	*ptr = val;
	return true;
}

static bool __maybe_unused
xdrgen_decode_uint64(struct xdr_stream *xdr, uint64 *ptr)
{
	return xdrgen_decode_unsigned_hyper(xdr, ptr);
}

static bool __maybe_unused
xdrgen_decode_int64(struct xdr_stream *xdr, int64 *ptr)
{
	return xdrgen_decode_hyper(xdr, ptr);
}

static bool __maybe_unused
xdrgen_decode_uint32(struct xdr_stream *xdr, uint32 *ptr)
{
	return xdrgen_decode_unsigned_long(xdr, ptr);
}

static bool __maybe_unused
xdrgen_decode_int32(struct xdr_stream *xdr, int32 *ptr)
{
	return xdrgen_decode_long(xdr, ptr);
}

static bool __maybe_unused
xdrgen_decode_nlm4_stats(struct xdr_stream *xdr, nlm4_stats *ptr)
{
	return xdr_stream_decode_be32(xdr, ptr) == 0;
}

static bool __maybe_unused
xdrgen_decode_nlm4_holder(struct xdr_stream *xdr, struct nlm4_holder *ptr)
{
	if (!xdrgen_decode_bool(xdr, &ptr->exclusive))
		return false;
	if (!xdrgen_decode_int32(xdr, &ptr->svid))
		return false;
	if (!xdrgen_decode_netobj(xdr, &ptr->oh))
		return false;
	if (!xdrgen_decode_uint64(xdr, &ptr->l_offset))
		return false;
	if (!xdrgen_decode_uint64(xdr, &ptr->l_len))
		return false;
	return true;
}

static bool __maybe_unused
xdrgen_decode_nlm4_testrply(struct xdr_stream *xdr, struct nlm4_testrply *ptr)
{
	if (!xdrgen_decode_nlm4_stats(xdr, &ptr->stat))
		return false;
	switch (ptr->stat) {
	case __constant_cpu_to_be32(NLM4_DENIED):

Annotation

Implementation Notes