MCPcopy Create free account
hub / github.com/axboe/liburing / io_uring_fgetxattr

Function io_uring_fgetxattr

test/xattr.c:63–98  ·  view source on GitHub ↗

Submit fgetxattr request. */

Source from the content-addressed store, hash-verified

61
62/* Submit fgetxattr request. */
63static int io_uring_fgetxattr(struct io_uring *ring, int fd, const char *name,
64 void *value, size_t size)
65{
66 struct io_uring_sqe *sqe;
67 struct io_uring_cqe *cqe;
68 int ret;
69
70 sqe = io_uring_get_sqe(ring);
71 if (!sqe) {
72 fprintf(stderr, "Error cannot get sqe\n");
73 return -1;
74 }
75
76 io_uring_prep_fgetxattr(sqe, fd, name, value, size);
77
78 ret = io_uring_submit(ring);
79 if (ret != 1) {
80 fprintf(stderr, "Error io_uring_submit_and_wait: ret=%d\n", ret);
81 return -1;
82 }
83
84 ret = io_uring_wait_cqe(ring, &cqe);
85 if (ret) {
86 fprintf(stderr, "Error io_uring_wait_cqe: ret=%d\n", ret);
87 return -1;
88 }
89
90 ret = cqe->res;
91 if (ret == -1) {
92 fprintf(stderr, "Error couldn'tget value\n");
93 return -1;
94 }
95
96 io_uring_cqe_seen(ring, cqe);
97 return ret;
98}
99
100/* Call setxattr. */
101static int io_uring_setxattr(struct io_uring *ring, const char *path,

Callers 2

test_fxattrFunction · 0.85
test_failure_fxattrFunction · 0.85

Calls 2

io_uring_submitFunction · 0.85
io_uring_get_sqeFunction · 0.50

Tested by 2

test_fxattrFunction · 0.68
test_failure_fxattrFunction · 0.68