SYS_FLEN was incorrectly handled as SYS_ISTTY. This patch fixes this
behaviour.
Change-Id: I66e0b97d8b44d2cb78e0b1bb940fd6f4b52c658f
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23752
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
if (argv[1] > files.size() || !files[argv[1]])
return retError(EBADF);
- int64_t ret = files[argv[1]]->isTTY();
+ int64_t ret = files[argv[1]]->flen();
if (ret < 0) {
return retError(-ret);
} else {
- return retOK(0);
+ return retOK(ret);
}
}