fs/nfsd/nfs4xdr_gen.c

Source file repositories/reference/linux-study-clean/fs/nfsd/nfs4xdr_gen.c

File Facts

System
Linux kernel
Corpus path
fs/nfsd/nfs4xdr_gen.c
Extension
.c
Size
14250 bytes
Lines
570
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/nfs4_1.x
// XDR specification modification time: Thu Jan  8 23:12:07 2026

#include <linux/sunrpc/svc.h>

#include "nfs4xdr_gen.h"

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

static bool __maybe_unused
xdrgen_decode_uint32_t(struct xdr_stream *xdr, uint32_t *ptr)
{
	return xdrgen_decode_unsigned_int(xdr, ptr);
}

static bool __maybe_unused
xdrgen_decode_bitmap4(struct xdr_stream *xdr, bitmap4 *ptr)
{
	if (xdr_stream_decode_u32(xdr, &ptr->count) < 0)
		return false;
	for (u32 i = 0; i < ptr->count; i++)
		if (!xdrgen_decode_uint32_t(xdr, &ptr->element[i]))
			return false;
	return true;
}

static bool __maybe_unused
xdrgen_decode_utf8string(struct xdr_stream *xdr, utf8string *ptr)
{
	return xdrgen_decode_opaque(xdr, ptr, 0);
}

static bool __maybe_unused
xdrgen_decode_utf8str_cis(struct xdr_stream *xdr, utf8str_cis *ptr)
{
	return xdrgen_decode_utf8string(xdr, ptr);
}

static bool __maybe_unused
xdrgen_decode_utf8str_cs(struct xdr_stream *xdr, utf8str_cs *ptr)
{
	return xdrgen_decode_utf8string(xdr, ptr);
}

static bool __maybe_unused
xdrgen_decode_utf8str_mixed(struct xdr_stream *xdr, utf8str_mixed *ptr)
{
	return xdrgen_decode_utf8string(xdr, ptr);
}

static bool __maybe_unused
xdrgen_decode_nfstime4(struct xdr_stream *xdr, struct nfstime4 *ptr)
{
	if (!xdrgen_decode_int64_t(xdr, &ptr->seconds))
		return false;
	if (!xdrgen_decode_uint32_t(xdr, &ptr->nseconds))
		return false;
	return true;
}

static bool __maybe_unused
xdrgen_decode_fattr4_offline(struct xdr_stream *xdr, fattr4_offline *ptr)
{
	return xdrgen_decode_bool(xdr, ptr);
}

static bool __maybe_unused
xdrgen_decode_open_arguments4(struct xdr_stream *xdr, struct open_arguments4 *ptr)
{
	if (!xdrgen_decode_bitmap4(xdr, &ptr->oa_share_access))
		return false;
	if (!xdrgen_decode_bitmap4(xdr, &ptr->oa_share_deny))
		return false;
	if (!xdrgen_decode_bitmap4(xdr, &ptr->oa_share_access_want))
		return false;
	if (!xdrgen_decode_bitmap4(xdr, &ptr->oa_open_claim))
		return false;
	if (!xdrgen_decode_bitmap4(xdr, &ptr->oa_create_mode))
		return false;
	return true;
}

static bool __maybe_unused
xdrgen_decode_open_args_share_access4(struct xdr_stream *xdr, open_args_share_access4 *ptr)

Annotation

Implementation Notes