blob: e32366ad9444c2886bd77e765ab5a6165ef70443 [file] [log] [blame]
#include "defs.h"
#include DEF_MPERS_TYPE(seccomp_fprog_t)
#include "seccomp_fprog.h"
typedef struct seccomp_fprog seccomp_fprog_t;
#include MPERS_DEFS
MPERS_PRINTER_DECL(bool, fetch_seccomp_fprog)(struct tcb *tcp, const long addr, void *p)
{
struct seccomp_fprog *pfp = p;
seccomp_fprog_t mfp;
if (sizeof(*pfp) == sizeof(mfp))
return !umove_or_printaddr(tcp, addr, pfp);
if (umove_or_printaddr(tcp, addr, &mfp))
return false;
pfp->len = mfp.len;
pfp->filter = mfp.filter;
return true;
}