Re: [PATCH] stdio: fix fread() from block device

2017-06-13 Thread Nadav Har'El
On Tue, Jun 13, 2017 at 5:54 PM, Justin Cinkelj wrote: > Patch seems to work, please apply. > > Instead of assert(), libcdio now complains if I ask to extract invalid > filename. > If you tried to read a non-existant file, it should have also failed this way previously, and not with an assert.

Re: [PATCH] stdio: fix fread() from block device

2017-06-13 Thread Justin Cinkelj
Patch seems to work, please apply. Instead of assert(), libcdio now complains if I ask to extract invalid filename. ./scripts/run.py --cloud-init-image test-udf1.iso -d --novnc -V -e '/usr/bin/iso-read.so -e /README-bla -o /tmp/config.yaml -d 5 -k /dev/vblk1; /cli/cli.so' ... iso-read.so: Could

[PATCH] stdio: fix fread() from block device

2017-06-13 Thread Nadav Har'El
@justinc1 discovered that strangely, our fread() implementation fails to read from a block device. This is because even if we fread() 1024 bytes, the implementation only asks from the readv() system call 1023 bytes, and then the last byte. The block device then refuses to make the unaligned read, c