Simplifies stacked ustreams and calling poll from the read function.
Reuse an unused leftover struct member in order to not break ABI.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This tells the compiler that these functions are takeing a format
string, the compiler will now do additional checks and is able to emitt
a compile warning in case the format string is not valid.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
It can be used to fill caller-specified buffer with data already in
ustream read buffer. Useful in the following use pattern.
int available = ustream_pending_data(s, false);
if (available >= sizeof(struct msghdr)) {
struct msghdr h;
ustream_read(s, &h, sizeof(h));
}
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>