#pragma once #include #include #include #include #include // TODO put req_readcopy in a global header int req_readcopy(VfsReq *req, const void *buf, size_t len); /* compare request path. path MUST be a static string */ #define reqpathcmp(req, path) _reqpathcmp(req, ""path"", sizeof(path) - 1) #define _reqpathcmp(req, path, plen) \ (req->kin && req->kinlen == plen && memcmp(req->kin, path, plen) == 0) size_t ring_to_virt(ring_t *r, Proc *proc, void __user *ubuf, size_t max);