net/local: Return the partial write size

N/A

Fix up that local socket will be endless loop when write data size more
than the fifo size.

Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: I69d63b7b156f0714333e7103bb266b7fcb1adf03
This commit is contained in:
丁欣童 2021-08-25 15:33:08 +08:00 committed by dingxintong
parent 5738f26938
commit 07283dffc3

View file

@ -98,7 +98,7 @@ static int local_fifo_write(FAR struct file *filep, FAR const uint8_t *buf,
nwritten += ret;
}
return nwritten;
return nwritten > 0 ? nwritten : ret;
}
/****************************************************************************