[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 7/7] Mini-OS: add read and write support to 9pfsfront
On 06.02.23 11:13, Samuel Thibault wrote: Juergen Gross, le ven. 03 févr. 2023 10:18:09 +0100, a ecrit:This patch is missing the limitation of read/write messages to stay below the max. supported message size.It should at least be asserted. It can easily be limited by returning the resulting limit as the number of processed bytes. +static int p9_read(struct dev_9pfs *dev, uint32_t fid, uint64_t offset, + uint8_t *data, uint32_t len) +{ + struct req *req = get_free_req(dev); + int ret; + uint32_t count; + + if ( !req ) + { + errno = EIO;Here as well (and in p9_write) we'd want EAGAIN rather than EIO which can be mistaken with the error case below. Fine with me. Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |