/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#include "nvpd_rpc.h"

bool_t
xdr_NvPdStatus (XDR *xdrs, NvPdStatus *objp)
{
	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_NvPciDevice (XDR *xdrs, NvPciDevice *objp)
{
	 if (!xdr_int (xdrs, &objp->domain))
		 return FALSE;
	 if (!xdr_int (xdrs, &objp->bus))
		 return FALSE;
	 if (!xdr_int (xdrs, &objp->slot))
		 return FALSE;
	 if (!xdr_int (xdrs, &objp->function))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_NvPersistenceMode (XDR *xdrs, NvPersistenceMode *objp)
{
	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_SetPersistenceModeArgs (XDR *xdrs, SetPersistenceModeArgs *objp)
{
	 if (!xdr_NvPciDevice (xdrs, &objp->device))
		 return FALSE;
	 if (!xdr_NvPersistenceMode (xdrs, &objp->mode))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_GetPersistenceModeArgs (XDR *xdrs, GetPersistenceModeArgs *objp)
{
	 if (!xdr_NvPciDevice (xdrs, &objp->device))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_GetPersistenceModeRes (XDR *xdrs, GetPersistenceModeRes *objp)
{
	 if (!xdr_NvPdStatus (xdrs, &objp->status))
		 return FALSE;
	switch (objp->status) {
	case NVPD_SUCCESS:
		 if (!xdr_NvPersistenceMode (xdrs, &objp->GetPersistenceModeRes_u.mode))
			 return FALSE;
		break;
	default:
		break;
	}
	return TRUE;
}

bool_t
xdr_NvNumaStatus (XDR *xdrs, NvNumaStatus *objp)
{
	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_SetNumaStatusArgs (XDR *xdrs, SetNumaStatusArgs *objp)
{
	 if (!xdr_NvPciDevice (xdrs, &objp->device))
		 return FALSE;
	 if (!xdr_NvNumaStatus (xdrs, &objp->status))
		 return FALSE;
	return TRUE;
}
