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

Function verify_probe

test/probe.c:17–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15static int no_probe;
16
17static int verify_probe(struct io_uring_probe *p, int full)
18{
19 if (!full && p->ops_len) {
20 fprintf(stderr, "Got ops_len=%u\n", p->ops_len);
21 return 1;
22 }
23 if (!p->last_op) {
24 fprintf(stderr, "Got last_op=%u\n", p->last_op);
25 return 1;
26 }
27 if (!full)
28 return 0;
29 /* check a few ops that must be supported */
30 if (!(p->ops[IORING_OP_NOP].flags & IO_URING_OP_SUPPORTED)) {
31 fprintf(stderr, "NOP not supported!?\n");
32 return 1;
33 }
34 if (!(p->ops[IORING_OP_READV].flags & IO_URING_OP_SUPPORTED)) {
35 fprintf(stderr, "READV not supported!?\n");
36 return 1;
37 }
38 if (!(p->ops[IORING_OP_WRITE].flags & IO_URING_OP_SUPPORTED)) {
39 fprintf(stderr, "WRITE not supported!?\n");
40 return 1;
41 }
42
43 return 0;
44}
45
46static int test_probe_helper(struct io_uring *ring)
47{

Callers 2

test_probe_helperFunction · 0.85
test_probeFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_probe_helperFunction · 0.68
test_probeFunction · 0.68