Created
May 3, 2016 21:19
-
-
Save naehrwert/92e24a4ac58a692752ca1565168f7a60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int _ioctlv(int fd, int cmd, u32 num_in, u32 num_io, ioctlv_vec *vec, ...) | |
{ | |
/* ... */ | |
dev_ctxt *dev = get_dev(...); | |
u32 num_total = num_int + num_out; | |
/* ... */ | |
if(num_total <= dev->max_vecs) | |
{ | |
/* Copy in vectors if num_total <= 8 else use external vectors. */ | |
/* Check vector buffer addrs. */ | |
} | |
else | |
res = -11; | |
/* ... */ | |
} | |
int _dev_register(char *path, int mqid, int pid) | |
{ | |
/* ... */ | |
dev->max_vecs = 8; | |
/* ... */ | |
} | |
int syscall_2E_set_ioctlv_max_vecs(char *name, u16 num) | |
{ | |
/* ... */ | |
dev->max_vecs = num; | |
/* ... */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment