ref: e44ea2b103b1d7964a4ad345e7ce6bd24615ebf0
parent: faa625a1d5ab47ac0438b2cea5b2bde1ea747b8b
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Aug 19 23:00:39 EDT 2023
libdraw: use IOUNIT for transfer block size in readimage()
--- a/sys/src/libdraw/readimage.c
+++ b/sys/src/libdraw/readimage.c
@@ -29,8 +29,11 @@
return nil;
if(d != nil)
chunk = d->bufsize - 32; /* a little room for header */
- else
- chunk = 8192;
+ else {
+ chunk = iounit(fd);
+ if(chunk <= 0)
+ chunk = IOUNIT;
+ }
/*
* distinguish new channel descriptor from old ldepth.