| 385 | } |
| 386 | |
| 387 | static int probe_buf_select(void) |
| 388 | { |
| 389 | struct io_uring_probe *p; |
| 390 | struct io_uring ring; |
| 391 | int ret; |
| 392 | |
| 393 | ret = io_uring_queue_init(1, &ring, 0); |
| 394 | if (ret) { |
| 395 | fprintf(stderr, "ring create failed: %d\n", ret); |
| 396 | return 1; |
| 397 | } |
| 398 | |
| 399 | p = io_uring_get_probe_ring(&ring); |
| 400 | if (!p || !io_uring_opcode_supported(p, IORING_OP_PROVIDE_BUFFERS)) { |
| 401 | no_buf_select = 1; |
| 402 | fprintf(stdout, "Buffer select not supported, skipping\n"); |
| 403 | return 0; |
| 404 | } |
| 405 | io_uring_free_probe(p); |
| 406 | return 0; |
| 407 | } |
| 408 | |
| 409 | int main(int argc, char *argv[]) |
| 410 | { |
no test coverage detected