DECL_PIOCTL(PNFSNukeCreds);
DECL_PIOCTL(PNewUuid);
DECL_PIOCTL(PPrecache);
+DECL_PIOCTL(PGetPAG);
#if defined(AFS_CACHE_BYPASS)
DECL_PIOCTL(PSetCachingThreshold);
DECL_PIOCTL(PSetCachingBlkSize);
PBogus, /* 0 */
PBogus, /* 0 */
PPrecache, /* 12 */
+ PGetPAG, /* 13 */
};
static int (*(OpioctlSw[])) () = {
return EACCES;
}
+/*!
+ * VIOC_GETPAG (13) - Get PAG value
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout PAG value or NOPAG
+ *
+ * \retval E2BIG Error not enough space to copy out value
+ *
+ * \post get PAG value for the caller's cred
+ */
+DECL_PIOCTL(PGetPAG)
+{
+ afs_int32 pag;
+
+ if (aoutSize < sizeof(afs_int32)) {
+ return E2BIG;
+ }
+
+ pag = PagInCred(*acred);
+
+ memcpy(aout, (char *)&pag, sizeof(afs_int32));
+ *aoutSize = sizeof(afs_int32);
+ return 0;
+}
+
DECL_PIOCTL(PPrecache)
{
afs_int32 newValue;