<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2010-06-10)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>sh</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-06-10 Sebastian Huber <sebastian.huber@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().
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2362&r2=text&tr2=1.2363&diff_format=h">M</a></td><td width='1%'>1.2363</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/Makefile.am.diff?r1=text&tr1=1.120&r2=text&tr2=1.121&diff_format=h">M</a></td><td width='1%'>1.121</td><td width='100%'>cpukit/libcsupport/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/include/rtems/libio.h.diff?r1=text&tr1=1.69&r2=text&tr2=1.70&diff_format=h">M</a></td><td width='1%'>1.70</td><td width='100%'>cpukit/libcsupport/include/rtems/libio.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/mount-mktgt.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">cpukit/libcsupport/src/mount-mktgt.c</font></td></tr>
</table>
<pre>
<font color='#006600'>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
</font><font color='#997700'>@@ -1,3 +1,10 @@
</font><font color='#000088'>+2010-06-10    Sebastian Huber <sebastian.huber@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().
+
</font> 2010-06-09        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
        * libnetworking/rtems/ftpfs.h, libnetworking/lib/ftpfs.c:  Added

<font color='#006600'>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
</font><font color='#997700'>@@ -44,7 +44,7 @@
</font>     src/assocremotebylocal.c src/assocremotebyname.c
 
 BASE_FS_C_FILES = src/base_fs.c src/mount.c src/unmount.c src/libio.c \
<font color='#880000'>-    src/mount-mgr.c src/libio_init.c \
</font><font color='#000088'>+    src/mount-mgr.c src/mount-mktgt.c src/libio_init.c \
</font>     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
 

<font color='#006600'>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
</font><font color='#997700'>@@ -704,6 +704,25 @@
</font>   const void                 *data
 );
 
<font color='#000088'>+/**
+ * @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
+);
+
</font> /*
  *  Boot Time Mount Table Structure
  */
<font color='#997700'>@@ -736,7 +755,7 @@
</font>  * The @a mode value selects the access permissions of the directory.
  *
  * @retval 0 Successful operation.
<font color='#880000'>- * @retval -1 An error occured.  @c errno indicates the error.
</font><font color='#000088'>+ * @retval -1 An error occured.  The @c errno indicates the error.
</font>  */
 extern int rtems_mkdir(const char *path, mode_t mode);
 

<font color='#006600'>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
</font><font color='#997700'>@@ -0,0 +1,56 @@
</font><font color='#000088'>+/**
+ * @file
+ *
+ * @ingroup LibIO
+ *
+ * @brief mount_and_make_target_path() implementation.
+ */
+
+/*
+ * Copyright (c) 2010
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * D-82178 Puchheim
+ * Germany
+ * <rtems@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;
+}
</font></pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>