commit 9f898869e18e5d2bda5be22b76ea0f3e7a5b1a17 from: Omar Polo date: Wed Feb 02 18:39:25 2022 UTC 9pclib: fix wstat serialization commit - 4e7aba8ffdd8756bf7af73dfb5d8b0efa01ce9c1 commit + 9f898869e18e5d2bda5be22b76ea0f3e7a5b1a17 blob - ed070718b0c80689f8e83e13ec1eec4c88631f13 blob + 8da3a5aeb11a7e6157b9db09f97d12241104beaa --- lib/9pclib.c +++ lib/9pclib.c @@ -251,7 +251,7 @@ void twstat(uint32_t fid, const struct np_stat *st) { uint32_t len; - uint16_t stlen; + uint16_t stlen, n; /* fid[4] stat[n] */ @@ -265,10 +265,12 @@ twstat(uint32_t fid, const struct np_stat *st) if (st->muid != NULL) stlen += strlen(st->muid); - len = sizeof(fid) + sizeof(stlen) + stlen; + n = sizeof(stlen) + stlen; + len = sizeof(fid) + sizeof(n) + n; write_hdr_auto(len, Twstat); write_fid(fid); + write_16(n); write_16(stlen); write_16(st->type); write_32(st->dev);