* [LTP] [PATCH 1/1] tst_device.h: Use <sys/syscall.h> and fallback to sync()
@ 2020-01-20 10:54 Petr Vorel
2020-01-20 12:29 ` Cyril Hrubis
0 siblings, 1 reply; 2+ messages in thread
From: Petr Vorel @ 2020-01-20 10:54 UTC (permalink / raw)
To: ltp
This partly reverts commit 9e83513eb, which unconditionally included
lapi/syscalls.h. Put back <sys/syscall.h> and fallback to sync() for
these rare cases where __NR_syncfs.
Hope this is final fix for syncfs() issues.
Fixes: 9e83513eb "tst_device.h: Use lapi/syscalls.h instead of <sys/syscall.h>"
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
include/tst_device.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/tst_device.h b/include/tst_device.h
index 13d92ee54..1456cb2ff 100644
--- a/include/tst_device.h
+++ b/include/tst_device.h
@@ -19,7 +19,7 @@
#define TST_DEVICE_H__
#include <unistd.h>
-#include "lapi/syscalls.h"
+#include <sys/syscall.h>
struct tst_device {
const char *dev;
@@ -78,7 +78,12 @@ int tst_detach_device(const char *dev_path);
*/
static inline int tst_dev_sync(int fd)
{
+#ifdef __NR_syncfs
return syscall(__NR_syncfs, fd);
+#else
+ sync();
+ return 0;
+#endif
}
/*
--
2.24.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH 1/1] tst_device.h: Use <sys/syscall.h> and fallback to sync()
2020-01-20 10:54 [LTP] [PATCH 1/1] tst_device.h: Use <sys/syscall.h> and fallback to sync() Petr Vorel
@ 2020-01-20 12:29 ` Cyril Hrubis
0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2020-01-20 12:29 UTC (permalink / raw)
To: ltp
Hi!
I would rather fix the socketcall tests, I do not thing that anything
else would break.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-20 12:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20 10:54 [LTP] [PATCH 1/1] tst_device.h: Use <sys/syscall.h> and fallback to sync() Petr Vorel
2020-01-20 12:29 ` Cyril Hrubis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.