[rtems commit] Filesystem: New function
Joel Sherrill
joel at rtems.org
Thu Mar 29 14:14:28 UTC 2012
Module: rtems
Branch: master
Commit: 04b9eaa238b88d2559e0167bc5320d70e120c088
Changeset: http://git.rtems.org/rtems/commit/?id=04b9eaa238b88d2559e0167bc5320d70e120c088
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Feb 24 09:53:22 2012 +0100
Filesystem: New function
New function rtems_filesystem_default_lseek_success().
---
cpukit/libcsupport/include/rtems/libio.h | 20 +++++++++++---
cpukit/libfs/Makefile.am | 1 +
cpukit/libfs/src/defaults/default_lseek_success.c | 29 +++++++++++++++++++++
3 files changed, 46 insertions(+), 4 deletions(-)
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index 4a09e0c..e17a438 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -844,13 +844,14 @@ typedef int (*rtems_filesystem_ioctl_t)(
* @brief Moves the read/write file offset.
*
* @param[in, out] iop The IO pointer.
- * @param[in] offset The new offset.
- * @param[in] whence The reference position of the new offset.
+ * @param[in] offset The offset.
+ * @param[in] whence The reference position for the offset.
*
* @retval non-negative The new offset from the beginning of the file.
* @retval -1 An error occured. The errno is set to indicate the error.
*
- * @see rtems_filesystem_default_lseek().
+ * @see rtems_filesystem_default_lseek() and
+ * rtems_filesystem_default_lseek_success().
*/
typedef off_t (*rtems_filesystem_lseek_t)(
rtems_libio_t *iop,
@@ -1019,7 +1020,18 @@ int rtems_filesystem_default_ioctl(
*/
off_t rtems_filesystem_default_lseek(
rtems_libio_t *iop,
- off_t length,
+ off_t offset,
+ int whence
+);
+
+/**
+ * @retval 0 Always.
+ *
+ * @see rtems_filesystem_lseek_t.
+ */
+off_t rtems_filesystem_default_lseek_success(
+ rtems_libio_t *iop,
+ off_t offset,
int whence
);
diff --git a/cpukit/libfs/Makefile.am b/cpukit/libfs/Makefile.am
index ad10348..18c4c47 100644
--- a/cpukit/libfs/Makefile.am
+++ b/cpukit/libfs/Makefile.am
@@ -21,6 +21,7 @@ libdefaultfs_a_SOURCES = \
src/defaults/default_chown.c \
src/defaults/default_fcntl.c src/defaults/default_fsmount.c \
src/defaults/default_ftruncate.c src/defaults/default_lseek.c \
+ src/defaults/default_lseek_success.c \
src/defaults/default_readlink.c src/defaults/default_statvfs.c \
src/defaults/default_utime.c \
src/defaults/default_fdatasync.c src/defaults/default_fstat.c \
diff --git a/cpukit/libfs/src/defaults/default_lseek_success.c b/cpukit/libfs/src/defaults/default_lseek_success.c
new file mode 100644
index 0000000..d6a1cb4
--- /dev/null
+++ b/cpukit/libfs/src/defaults/default_lseek_success.c
@@ -0,0 +1,29 @@
+
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems at embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#if HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/libio_.h>
+
+off_t rtems_filesystem_default_lseek_success(
+ rtems_libio_t *iop,
+ off_t offset,
+ int whence
+)
+{
+ return 0;
+}
More information about the vc
mailing list