systemtap/systemtap-compile-warning-fixes.diff

14 lines
518 B
Diff

--- runtime/staprun/mainloop.c-dist 2007-04-24 18:38:24.000000000 +0200
+++ runtime/staprun/mainloop.c 2007-04-24 18:39:20.000000000 +0200
@@ -300,7 +300,9 @@ int stp_main_loop(void)
switch (type) {
#ifdef STP_OLD_TRANSPORT
case STP_REALTIME_DATA:
- write(out_fd[0], data, nb - sizeof(int));
+ if (write(out_fd[0], data, nb - sizeof(int)) !=
+ (ssize_t)(nb - sizeof(int)))
+ fprintf(stderr, "WARNING: short STP_REALTIME_DATA written\n");
break;
#endif
case STP_OOB_DATA: