change log for rtems (2010-06-10)
rtems-vc at rtems.org
rtems-vc at rtems.org
Thu Jun 10 09:12:02 UTC 2010
*sh*:
2010-06-10 Sebastian Huber <sebastian.huber at embedded-brains.de>
* libcsupport/src/mount-mktgt.c: New file.
* libcsupport/Makefile.am: Reflect change above.
* libcsupport/include/rtems/libio.h: Declare
mount_and_make_target_path().
M 1.2363 cpukit/ChangeLog
M 1.121 cpukit/libcsupport/Makefile.am
M 1.70 cpukit/libcsupport/include/rtems/libio.h
A 1.1 cpukit/libcsupport/src/mount-mktgt.c
diff -u rtems/cpukit/ChangeLog:1.2362 rtems/cpukit/ChangeLog:1.2363
--- rtems/cpukit/ChangeLog:1.2362 Wed Jun 9 06:36:06 2010
+++ rtems/cpukit/ChangeLog Thu Jun 10 04:07:28 2010
@@ -1,3 +1,10 @@
+2010-06-10 Sebastian Huber <sebastian.huber at embedded-brains.de>
+
+ * libcsupport/src/mount-mktgt.c: New file.
+ * libcsupport/Makefile.am: Reflect change above.
+ * libcsupport/include/rtems/libio.h: Declare
+ mount_and_make_target_path().
+
2010-06-09 Sebastian Huber <sebastian.huber at embedded-brains.de>
* libnetworking/rtems/ftpfs.h, libnetworking/lib/ftpfs.c: Added
diff -u rtems/cpukit/libcsupport/Makefile.am:1.120 rtems/cpukit/libcsupport/Makefile.am:1.121
--- rtems/cpukit/libcsupport/Makefile.am:1.120 Tue Jun 8 07:59:51 2010
+++ rtems/cpukit/libcsupport/Makefile.am Thu Jun 10 04:07:28 2010
@@ -44,7 +44,7 @@
src/assocremotebylocal.c src/assocremotebyname.c
BASE_FS_C_FILES = src/base_fs.c src/mount.c src/unmount.c src/libio.c \
- src/mount-mgr.c src/libio_init.c \
+ src/mount-mgr.c src/mount-mktgt.c src/libio_init.c \
src/libio_sockets.c src/eval.c src/fs_null_handlers.c src/privateenv.c \
src/open_dev_console.c src/__usrenv.c src/rtems_mkdir.c
diff -u rtems/cpukit/libcsupport/include/rtems/libio.h:1.69 rtems/cpukit/libcsupport/include/rtems/libio.h:1.70
--- rtems/cpukit/libcsupport/include/rtems/libio.h:1.69 Wed Jun 9 04:38:09 2010
+++ rtems/cpukit/libcsupport/include/rtems/libio.h Thu Jun 10 04:07:28 2010
@@ -704,6 +704,25 @@
const void *data
);
+/**
+ * @brief Mounts a file system and makes the @a target path.
+ *
+ * The @a target path will be created with rtems_mkdir() and must not be
+ * @c NULL.
+ *
+ * @see mount().
+ *
+ * @retval 0 Successful operation.
+ * @retval -1 An error occured. The @c errno indicates the error.
+ */
+int mount_and_make_target_path(
+ const char *source,
+ const char *target,
+ const char *filesystemtype,
+ rtems_filesystem_options_t options,
+ const void *data
+);
+
/*
* Boot Time Mount Table Structure
*/
@@ -736,7 +755,7 @@
* The @a mode value selects the access permissions of the directory.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. @c errno indicates the error.
+ * @retval -1 An error occured. The @c errno indicates the error.
*/
extern int rtems_mkdir(const char *path, mode_t mode);
diff -u /dev/null rtems/cpukit/libcsupport/src/mount-mktgt.c:1.1
--- /dev/null Thu Jun 10 04:12:02 2010
+++ rtems/cpukit/libcsupport/src/mount-mktgt.c Thu Jun 10 04:07:28 2010
@@ -0,0 +1,56 @@
+/**
+ * @file
+ *
+ * @ingroup LibIO
+ *
+ * @brief mount_and_make_target_path() implementation.
+ */
+
+/*
+ * Copyright (c) 2010
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * D-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 <errno.h>
+
+#include <rtems/libio.h>
+
+int mount_and_make_target_path(
+ const char *source,
+ const char *target,
+ const char *filesystemtype,
+ rtems_filesystem_options_t options,
+ const void *data
+)
+{
+ int rv = -1;
+
+ if (target != NULL) {
+ rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
+ if (rv == 0) {
+ rv = mount(
+ source,
+ target,
+ filesystemtype,
+ options,
+ data
+ );
+ }
+ } else {
+ errno = EINVAL;
+ }
+
+ return rv;
+}
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100610/99c059ce/attachment-0001.html>
More information about the vc
mailing list