Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-gpu-driver/blob/main/tests/uvme_offsets.c # omega-gpu-driver aien-dev/omega-gpu-driver Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-gpu-driver / tests / uvme_offsets.c` 19 lines ยท 1253 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 * A read-only host offsetof oracle, not an endpoint implementation. */ 3 #include 4 #include 5 #include 6 #define SIZE(t) printf(#t " %zu\n", sizeof(struct t)) 7 #define OFF(t,f) printf(#t "." #f " %zu\n", offsetof(struct t,f)) 8 int main(void) { 9 SIZE(fuse_in_header); OFF(fuse_in_header,unique); OFF(fuse_in_header,pid); OFF(fuse_in_header,total_extlen); 10 SIZE(fuse_out_header); OFF(fuse_out_header,error); OFF(fuse_out_header,unique); 11 SIZE(cuse_init_in); SIZE(cuse_init_out); OFF(cuse_init_out,flags); OFF(cuse_init_out,max_read); OFF(cuse_init_out,spare); 12 SIZE(fuse_open_in); SIZE(fuse_open_out); OFF(fuse_open_out,open_flags); 13 SIZE(fuse_release_in); SIZE(fuse_flush_in); 14 SIZE(fuse_ioctl_in); OFF(fuse_ioctl_in,flags); OFF(fuse_ioctl_in,cmd); OFF(fuse_ioctl_in,arg); OFF(fuse_ioctl_in,in_size); OFF(fuse_ioctl_in,out_size); 15 SIZE(fuse_ioctl_out); OFF(fuse_ioctl_out,flags); OFF(fuse_ioctl_out,in_iovs); OFF(fuse_ioctl_out,out_iovs); 16 SIZE(fuse_ioctl_iovec); OFF(fuse_ioctl_iovec,len); 17 printf("flags %u %u %u %u\n", CUSE_UNRESTRICTED_IOCTL, FUSE_IOCTL_UNRESTRICTED, FUSE_IOCTL_RETRY, FOPEN_DIRECT_IO | FOPEN_NOFLUSH); 18 return 0; 19 }