inotify: fix typo in write() error message (1 -> BUF_SIZE)
PATCH 1/1 inotify: fix typo in write() error message (1 -> BUF_SIZE)
The error message in the write() failure check uses a hardcoded '1' instead of BUF_SIZE, leading to misleading logs when write() fails.
This patch fixes the format string to show the actual size.
Signed-off-by Jinseok Kim <[email protected]>
--- testcases/kernel/syscalls/inotify/inotify01.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/inotify/inotify01.c +1 -1
@@ -72,7 +72,7 @@ void verify_inotify(void)if (write (fd, buf,BUF_SIZE ) ==-1 ) {tst_brk (TBROK , -"write(%d, %s, 1) failed" , fd, fname); +"write(%d, %s, %d) failed" , fd, fname,BUF_SIZE ); } event_set[test_cnt] =IN_MODIFY ; test_cnt++;
--
2.43.0
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Patch merged, thanks!
Signature · 6 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp