Whamcloud - gitweb
LU-5396 libcfs: add sparse annotation __user wherever needed
[fs/lustre-release.git] / libcfs / libcfs / tracefile.h
index 9ba2ff7..6eed697 100644 (file)
 #include <libcfs/libcfs.h>
 
 #ifdef __KERNEL__
-#if defined(__linux__)
-#include "linux/linux-tracefile.h"
-#else
-#error Unsupported operating system.
-#endif
-#else
-#include "posix/posix-tracefile.h"
-#endif
+# include "linux/linux-tracefile.h"
+#else /* __KERNEL__ */
+# include "posix/posix-tracefile.h"
+#endif /* !__KERNEL__ */
 /* trace file lock routines */
 
 #define TRACEFILE_NAME_SIZE 1024
@@ -75,16 +71,16 @@ void cfs_tracefile_exit(void);
 
 
 int cfs_trace_copyin_string(char *knl_buffer, int knl_buffer_nob,
-                            const char *usr_buffer, int usr_buffer_nob);
-int cfs_trace_copyout_string(char *usr_buffer, int usr_buffer_nob,
+                           const char __user *usr_buffer, int usr_buffer_nob);
+int cfs_trace_copyout_string(char __user *usr_buffer, int usr_buffer_nob,
                              const char *knl_str, char *append);
 int cfs_trace_allocate_string_buffer(char **str, int nob);
 void cfs_trace_free_string_buffer(char *str, int nob);
-int cfs_trace_dump_debug_buffer_usrstr(void *usr_str, int usr_str_nob);
+int cfs_trace_dump_debug_buffer_usrstr(void __user *usr_str, int usr_str_nob);
 int cfs_trace_daemon_command(char *str);
-int cfs_trace_daemon_command_usrstr(void *usr_str, int usr_str_nob);
+int cfs_trace_daemon_command_usrstr(void __user *usr_str, int usr_str_nob);
 int cfs_trace_set_debug_mb(int mb);
-int cfs_trace_set_debug_mb_usrstr(void *usr_str, int usr_str_nob);
+int cfs_trace_set_debug_mb_usrstr(void __user *usr_str, int usr_str_nob);
 int cfs_trace_get_debug_mb(void);
 
 extern void libcfs_debug_dumplog_internal(void *arg);