1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
5 * Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
8 #ifndef _LTTNG_WRAPPER_FS_H
9 #define _LTTNG_WRAPPER_FS_H
12 #include <lttng-kernel-version.h>
14 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
17 ssize_t
lttng_kernel_read(struct file
*file
, void *buf
, size_t count
, loff_t
*pos
)
19 return kernel_read(file
, buf
, count
, pos
);
22 #else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) */
25 ssize_t
lttng_kernel_read(struct file
*file
, void *buf
, size_t count
, loff_t
*pos
)
29 len
= kernel_read(file
, *pos
, buf
, count
);
32 * Move 'pos' forward since it's passed by value in this
33 * implementation of 'kernel_read'.
41 #endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) */
43 #endif /* _LTTNG_WRAPPER_FS_H */
This page took 0.031107 seconds and 4 git commands to generate.