Where are you seeing it documented like that? syscalls do syscall things, so that's -1/errno. liburing turns that into return codes directly. For a cqe, ->res is -errno or return code.
-
-
Replying to @axboe
It is documented in many places as -1. First, in the man pages, the documentation for the res value says:pic.twitter.com/NLv3csRQ1p
2 replies 0 retweets 1 like -
Replying to @cmuratori @axboe
And so if you then look at the documented return values of preadv2(2) and pwritev2(2), it says:pic.twitter.com/1RD6uTJGmq
2 replies 0 retweets 0 likes -
Replying to @cmuratori @axboe
I guess this is just a mistake in the man pages?
1 reply 0 retweets 0 likes -
Replying to @cmuratori
If it's not clear enough how it works, then they should be improved of course. But I'm honestly a bit at a loss at how you would arrive at that conclusion :-) But I'm always interested in improving it, especially if basic concepts like that aren't clear.
1 reply 0 retweets 0 likes -
Replying to @axboe
Linux APIs have had many equivalent bad decisions as this, so I do not assume that the way that I think something should work is the way that it works.
2 replies 0 retweets 0 likes -
Replying to @cmuratori @axboe
I would love to live in a world where the way I expect something to work was the way it worked, and I could just assume the manual is wrong if it's not that :) But that is not the world I find myself in 99% of the time.
1 reply 0 retweets 0 likes -
Replying to @cmuratori
Let's not keep calling it wrong, because imho it is not. It could be clearer, but it's definitely not saying that cqe->res == -1 for any error and errno being where to look.
1 reply 0 retweets 0 likes -
-
This Tweet is unavailable.
Yes - the man pages do not document syscall returns as the "return value", so if you reference a man page, you are referencing the libc return value. If they instead simply said "it is the result of the syscall" (which it does elsewhere, apparently?), there would be no confusion.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.