gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r20607 - gnunet-fuse/src/ext


From: gnunet
Subject: [GNUnet-SVN] r20607 - gnunet-fuse/src/ext
Date: Mon, 19 Mar 2012 16:04:30 +0100

Author: mauricio
Date: 2012-03-19 16:04:30 +0100 (Mon, 19 Mar 2012)
New Revision: 20607

Added:
   gnunet-fuse/src/ext/getattr.c
   gnunet-fuse/src/ext/mkdir.c
   gnunet-fuse/src/ext/mknod.c
   gnunet-fuse/src/ext/open.c
   gnunet-fuse/src/ext/read.c
   gnunet-fuse/src/ext/readdir.c
   gnunet-fuse/src/ext/release.c
   gnunet-fuse/src/ext/rename.c
   gnunet-fuse/src/ext/rmdir.c
   gnunet-fuse/src/ext/truncate.c
   gnunet-fuse/src/ext/unlink.c
   gnunet-fuse/src/ext/utimens.c
   gnunet-fuse/src/ext/write.c
Modified:
   gnunet-fuse/src/ext/gnunet-fuse.c
Log:
--changes


Added: gnunet-fuse/src/ext/getattr.c
===================================================================
--- gnunet-fuse/src/ext/getattr.c                               (rev 0)
+++ gnunet-fuse/src/ext/getattr.c       2012-03-19 15:04:30 UTC (rev 20607)
@@ -0,0 +1,132 @@
+/*
+ * getattr.c - FUSE getattr function
+ *
+ *  Created on: Mar 14, 2012
+ *      Author: mg
+ *
+ *
+ *      Get file attributes.
+ *
+ * Similar to stat().  The 'st_dev' and 'st_blksize' fields are
+ * ignored.     The 'st_ino' field is ignored except if the 'use_ino'
+ * mount option is given.
+ */
+
+#include <sys/stat.h>
+#include <string.h>
+#include <errno.h>
+#include <fuse.h>
+#include <gnunet-fuse.h>
+
+int gn_getattr(const char *path, struct stat *stbuf)
+{
+       int ret = 0;
+       GNUNET_break (0);
+       memset(stbuf, 0, sizeof(struct stat));
+
+       if(strcmp(path, "/") == 0)
+       {
+       stbuf->st_mode = S_IFDIR | 0755;
+       stbuf->st_nlink = 2;
+       }
+       else if(strcmp(path, directory) == 0)
+       {
+               stbuf->st_mode = S_IFDIR | 0755;
+               stbuf->st_nlink = 1;
+       }
+       else if(strcmp(path, "/probe/mal") == 0)
+       {
+               stbuf->st_mode = S_IFREG | 0444;
+                               stbuf->st_nlink = 1;
+                               stbuf->st_size = strlen("/probe/mal/inhalt");
+       }
+       else return -ENOENT;
+
+       return ret;
+
+
+
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+static const char *archive_path = "/";
+static const char *archive_str = "/Archive\n";
+
+static const char *britney_path = "/Britney Spears";
+static const char *britney_str = "Britney Spears\n";
+
+static const char *britney_br_path = "/Britney Spears/Britney";
+static const char *britney_br_str = "Britney\n";
+
+static const char *b_br_1_path = "/Britney Spears/Britney/I'm a Slave 4 U";
+       static const char *b_br_1_str = "3:23 U\n";
+
+
+int gn_getattr(const char *path, struct stat *stbuf)
+{
+
+int res = 0;
+
+       memset(stbuf, 0, sizeof(struct stat));
+
+       if(strcmp(path, "/") == 0) {    //attr. fuer  parent vz
+               stbuf->st_mode = S_IFDIR | 0755;
+               stbuf->st_nlink = 3;
+               }
+
+       else if(strcmp(path, britney_path) == 0) { //attr. fuer 
unterverzeichnis Britney
+               stbuf->st_mode = S_IFDIR | 0755;
+               stbuf->st_nlink = 3;
+           }
+
+       else if(strcmp(path, britney_br_path) == 0) {  //Attribute fuer 
UnterUnterverzeichnis Britney
+        stbuf->st_mode = S_IFDIR | 0755;
+           stbuf->st_nlink = 1;
+
+           }
+        else if(strcmp(path, b_br_1_path) == 0 ){  //Songnummer 1
+            stbuf->st_mode = S_IFREG | 0444;
+            stbuf->st_nlink = 1;
+            stbuf->st_size = strlen(b_br_1_str);
+            }
+
+       else res = -ENOENT;
+
+       return res;
+}
+
+*/

Modified: gnunet-fuse/src/ext/gnunet-fuse.c
===================================================================
--- gnunet-fuse/src/ext/gnunet-fuse.c   2012-03-19 14:53:13 UTC (rev 20606)
+++ gnunet-fuse/src/ext/gnunet-fuse.c   2012-03-19 15:04:30 UTC (rev 20607)
@@ -29,31 +29,12 @@
 #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
 #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file 
(kind, "util", syscall, filename)
 
-#include <gnunet/platform.h>
-#include <gnunet/gnunet_util_lib.h>
-#include <gnunet/gnunet_fs_service.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <errno.h>
-#include <fuse.h>
-#include <gnunet-fuse.h>
+#include "gnunet-fuse.h"
 
-#include "gnunet/gnunet_common.h"
-#include "gnunet/gnunet_configuration_lib.h"
-#include "gnunet/gnunet_crypto_lib.h"
-#include "gnunet/gnunet_directories.h"
-#include "gnunet/gnunet_getopt_lib.h"
-#include "gnunet/gnunet_os_lib.h"
-#include "gnunet/gnunet_program_lib.h"
-#include "gnunet/gnunet_resolver_service.h"
-#include "gnunet/gnunet_scheduler_lib.h"
-#include <gcrypt.h>
-
 static int ret;
 
-static char *source;
-static char *directory;
 
+
 /* Context for the command. */
 struct CommandContext
 {
@@ -76,45 +57,19 @@
 
 
 //  calling fuse operations
-/*
-int gn_open(const char *path, struct fuse_file_info *fi)
-{
-       return 0;
-}
 
-int gn_read(const char *path, char *buf, size_t size, off_t offset,
-               struct fuse_file_info *fi)
-{
-       return -2;
-}
-
-int gn_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
-       off_t offset, struct fuse_file_info *fi)
-{
-       return -2;
-}
-
-int gn_getattr(const char *path, struct stat *stbuf)
-{
-       return 0;
-}
-*/
 /*struct with renamed fuseoperations*/
 static struct fuse_operations fops = {
 
-               .mkdir = gn_mkdir,
-               .mknod = gn_mknod,
-
-
-
-               .release = gn_release,
-               .rename = gn_rename,
-               .rmdir = gn_rmdir,
-               .truncate = gn_truncate,
-               .unlink = gn_unlink,
-               .utimens = gn_utimens,
-               .write = gn_write,
-
+       //      .mkdir = gn_mkdir,
+       //      .mknod = gn_mknod,
+       //      .release = gn_release,
+       //      .rename = gn_rename,
+       //      .rmdir = gn_rmdir,
+       //      .truncate = gn_truncate,
+       //      .unlink = gn_unlink,
+       //      .utimens = gn_utimens,
+       //      .write = gn_write,
                .getattr = gn_getattr,
                .readdir = gn_readdir,
                .open = gn_open,
@@ -156,6 +111,7 @@
                return;
        }
 
+/* checking for muti- or singlethreading */
 
        if (GNUNET_YES == TESTING)
        {

Added: gnunet-fuse/src/ext/mkdir.c
===================================================================
--- gnunet-fuse/src/ext/mkdir.c                         (rev 0)
+++ gnunet-fuse/src/ext/mkdir.c 2012-03-19 15:04:30 UTC (rev 20607)
@@ -0,0 +1,25 @@
+/*
+ * mkdir.c - FUSE mkdir function
+ *
+ *  Created on: Mar 14, 2012
+ *  Author: mg
+ *
+ *
+ *     Create a directory
+ *
+ * Note that the mode argument may not have the type specification
+ * bits set, i.e. S_ISDIR(mode) can be false.  To obtain the
+ * correct directory type bits use  mode|S_IFDIR
+ * */
+
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fuse.h>
+
+
+int gn_mkdir(const char *path, mode_t mode)
+{
+       return 0;
+}

Added: gnunet-fuse/src/ext/mknod.c
===================================================================
--- gnunet-fuse/src/ext/mknod.c                         (rev 0)
+++ gnunet-fuse/src/ext/mknod.c 2012-03-19 15:04:30 UTC (rev 20607)
@@ -0,0 +1,23 @@
+/*
+ * mknod.c - FUSE mknod function
+ *
+ *  Created on: Mar 14, 2012
+ *      Author: mg
+ *
+ *
+ * Create a file node
+ *
+ * This is called for creation of all non-directory, non-symlink
+ * nodes.  If the filesystem defines a create() method, then for
+ * regular files that will be called instead.
+ */
+
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fuse.h>
+
+int gn_mknod(const char *path, mode_t mode, dev_t rdev)
+{
+       return 0;
+}

Added: gnunet-fuse/src/ext/open.c
===================================================================
--- gnunet-fuse/src/ext/open.c                          (rev 0)
+++ gnunet-fuse/src/ext/open.c  2012-03-19 15:04:30 UTC (rev 20607)
@@ -0,0 +1,108 @@
+/*
+ * open.c - FUSE open function
+ *
+ *  Created on: Mar 14, 2012
+ *      Author: mg
+ *
+ *  File open operation
+ *
+ * No creation (O_CREAT, O_EXCL) and by default also no
+ * truncation (O_TRUNC) flags will be passed to open(). If an
+ * application specifies O_TRUNC, fuse first calls truncate()
+ * and then open(). Only if 'atomic_o_trunc' has been
+ * specified and kernel version is 2.6.24 or later, O_TRUNC is
+ * passed on to open.
+ *
+ * Unless the 'default_permissions' mount option is given,
+ * open should check if the operation is permitted for the
+ * given flags. Optionally open may also return an arbitrary
+ * filehandle in the fuse_file_info structure, which will be
+ * passed to all file operations.
+ *
+ * Changed in version 2.2
+ */
+
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fuse.h>
+#include <gnunet-fuse.h>
+
+
+
+int gn_open(const char *path, struct fuse_file_info *fi)
+{
+
+
+       if (strcmp(path, directory) | strcmp(path, "/") == 0)
+               return 0;
+
+       else if ((fi->flags & 3) != O_RDONLY)
+               return -EACCES;
+
+
+       else return 0;
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+static const char *archive_path = "/";
+static const char *archive_str = "/Archive\n";
+
+static const char *britney_path = "/Britney Spears";
+static const char *britney_str = "Britney Spears\n";
+
+static const char *britney_br_path = "/Britney Spears/Britney";
+static const char *britney_br_str = "Britney\n";
+
+static const char *b_br_1_path = "/Britney Spears/Britney/I'm a Slave 4 U";
+       static const char *b_br_1_str = "3:23 U\n";
+
+
+        if((strcmp(path, archive_path) | strcmp(path, britney_path) | 
strcmp(path, britney_br_path))==0)
+             //   return -ENOENT;
+        return 0;
+
+        else if ( (fi->flags & 3) != O_RDONLY )
+        return -EACCES;
+
+        else  return 0;
+
+
+
+*/

Added: gnunet-fuse/src/ext/read.c
===================================================================
--- gnunet-fuse/src/ext/read.c                          (rev 0)
+++ gnunet-fuse/src/ext/read.c  2012-03-19 15:04:30 UTC (rev 20607)
@@ -0,0 +1,176 @@
+/*
+ * read.c - FUSE read function
+ *
+ *  Created on: Mar 14, 2012
+ *      Author: mg
+ *
+
+                Read data from an open file
+ *
+ * Read should return exactly the number of bytes requested except
+ * on EOF or error, otherwise the rest of the data will be
+ * substituted with zeroes.     An exception to this is when the
+ * 'direct_io' mount option is specified, in which case the return
+ * value of the read system call will reflect the return value of
+ * this operation.
+ *
+ * Changed in version 2.2
+ */
+
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fuse.h>
+#include <gnunet-fuse.h>
+
+
+
+
+int gn_read(const char *path, char *buf, size_t size, off_t offset,
+               struct fuse_file_info *fi)
+{
+       size_t len;
+       if (strcmp(path, directory) == 0)
+       {
+               len = strlen(directory);
+
+               if (offset < len)
+               {
+                       if (offset + size > len)
+                               size = len - offset;
+                               memcpy(buf, "/" + offset, size);
+               }
+               else
+                       size = 0;
+
+       return size;
+       }
+
+
+
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+ *
+ *
+
+static const char *archive_path = "/";
+static const char *archive_str = "/Archive\n";
+
+static const char *britney_path = "/Britney Spears";
+static const char *britney_str = "Britney Spears\n";
+
+static const char *britney_br_path = "/Britney Spears/Britney";
+static const char *britney_br_str = "Britney\n";
+
+static const char *b_br_1_path = "/Britney Spears/Britney/I'm a Slave 4 U";
+       static const char *b_br_1_str = "3:23 U\n";
+
+
+
+
+size_t len;
+           (void) fi;
+
+
+           if (strcmp(path, archive_path) == 0)
+             {
+               len = strlen(archive_str);
+               if (offset < len)
+                 {
+                 if (offset + size > len)
+                   size = len - offset;
+                 memcpy(buf, archive_str + offset, size);
+               }
+               else
+                 size = 0;
+
+               return size;
+             }
+
+
+           else if(strcmp(path, britney_path) == 0)
+             {
+               len = strlen(britney_str);
+               if (offset < len) {
+                 if (offset + size > len)
+                   size = len - offset;
+                 memcpy(buf, britney_str + offset, size);
+               }
+               else
+                 size = 0;
+
+               return size;
+             }
+
+               else if(strcmp(path, britney_br_path) == 0) // ab hier das 
verzeichnis britney spears
+               {
+               len = strlen(britney_br_str);
+               if (offset < len) {
+                       if (offset + size > len)
+                           size = len - offset;
+                         memcpy(buf, britney_br_str + offset, size);
+                       }
+                       else
+                         size = 0;
+
+                       return size;
+                     }
+
+           else if(strcmp(path, b_br_1_path) == 0) // ab hier album 
Britney-Lied1
+             {
+               len = strlen(b_br_1_str);
+               if (offset < len)
+                 {
+                 if (offset + size > len)
+                   size = len - offset;
+                 memcpy(buf, b_br_1_str + offset, size);
+               }
+               else
+                 size = 0;
+
+               return size;
+             }
+           else return -ENOENT;
+
+*/

Added: gnunet-fuse/src/ext/readdir.c
===================================================================
--- gnunet-fuse/src/ext/readdir.c                               (rev 0)
+++ gnunet-fuse/src/ext/readdir.c       2012-03-19 15:04:30 UTC (rev 20607)
@@ -0,0 +1,149 @@
+/*
+ * reddir.c - FUSE read directory function
+ *
+ *  Created on: Mar 14, 2012
+ *      Author: mg
+ *
+ * Read directory
+ *
+ * This supersedes the old getdir() interface.  New applications
+ * should use this.
+ *
+ * The filesystem may choose between two modes of operation:
+ *
+ * 1) The readdir implementation ignores the offset parameter, and
+ * passes zero to the filler function's offset.  The filler
+ * function will not return '1' (unless an error happens), so the
+ * whole directory is read in a single readdir operation.  This
+ * works just like the old getdir() method.
+ *
+ * 2) The readdir implementation keeps track of the offsets of the
+ * directory entries.  It uses the offset parameter and always
+ * passes non-zero offset to the filler function.  When the buffer
+ * is full (or an error happens) the filler function will return
+ * '1'.
+ *
+ * Introduced in version 2.3
+ */
+
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+//#include <glib.h>
+#include <fuse.h>
+//#include <GNUnet/gnunet_ecrs_lib.h>
+#include <gnunet-fuse.h>
+
+
+
+
+
+int gn_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
+       off_t offset, struct fuse_file_info *fi)
+{
+
+       static char* track = "directory/mal";
+       int len = strlen(directory);
+
+
+       if (strcmp(path, "/") == 0)
+       {
+               filler(buf, ".", NULL, 0);
+               filler(buf, "..", NULL, 0);
+               filler(buf, directory+1, NULL, 0);
+               return 0;
+       }
+       else if (strcmp(path, directory) == 0)  // mounted directory with 
content
+       {
+               filler(buf, ".", NULL, 0);
+               filler(buf, "..", NULL, 0);
+               filler(buf, track+len, NULL, 0); // path to directory mal
+               return 0;
+       }
+
+       else return -ENOENT;
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+
+static const char *archive_path = "/";
+static const char *archive_str = "/Archive\n";
+
+static const char *britney_path = "/Britney Spears";
+static const char *britney_str = "Britney Spears\n";
+
+static const char *britney_br_path = "/Britney Spears/Britney";
+static const char *britney_br_str = "Britney\n";
+
+static const char *b_br_1_path = "/Britney Spears/Britney/I'm a Slave 4 U";
+       static const char *b_br_1_str = "3:23 U\n";
+
+
+
+if(strcmp(path, "/") == 0)
+                   {
+                       filler(buf, ".", NULL, 0);
+                       filler(buf, "..", NULL, 0);
+
+                       filler(buf, britney_path + 1, NULL, 0);
+                       //filler(buf, metallica_path + 1, NULL, 0);
+                       return 0;
+                   }
+
+                else  if(strcmp(path, "/Britney Spears") == 0)
+                   {
+                       filler(buf, ".", NULL, 0);
+                       filler(buf, "..", NULL, 0);
+                       //filler(buf, britney_omt_path + 16, NULL, 0);
+                       filler(buf, britney_br_path + 16, NULL, 0);
+                       return 0;
+                   }
+
+                else  if(strcmp(path,  britney_br_path) == 0) // ab hier das 
album britney
+                   {
+                       filler(buf, ".", NULL, 0);
+                       filler(buf, "..", NULL, 0);
+                       filler(buf, b_br_1_path + 24 , NULL, 0);
+
+                       return 0;
+                   }
+
+                else return -ENOENT;
+
+
+
+*/

Added: gnunet-fuse/src/ext/release.c
===================================================================
--- gnunet-fuse/src/ext/release.c                               (rev 0)
+++ gnunet-fuse/src/ext/release.c       2012-03-19 15:04:30 UTC (rev 20607)
@@ -0,0 +1,29 @@
+/*
+ * release.c - FUSE release function
+ *
+ *  Created on: Mar 14, 2012
+ *      Author: mg
+ *
+ *
+ *     Release an open file
+ *
+ * Release is called when there are no more references to an open
+ * file: all file descriptors are closed and all memory mappings
+ * are unmapped.
+ *
+ * For every open() call there will be exactly one release() call
+ * with the same flags and file descriptor.     It is possible to
+ * have a file opened more than once, in which case only the last
+ * release will mean, that no more reads/writes will happen on the
+ * file.  The return value of release is ignored.
+ *
+ * Changed in version 2.2
+ */
+
+#include <fuse.h>
+//#include <gnunet-fuse.h>
+
+int gn_release(const char *path, struct fuse_file_info *fi)
+{
+       return 0;
+}

Added: gnunet-fuse/src/ext/rename.c
===================================================================
--- gnunet-fuse/src/ext/rename.c                                (rev 0)
+++ gnunet-fuse/src/ext/rename.c        2012-03-19 15:04:30 UTC (rev 20607)
@@ -0,0 +1,22 @@
+/*
+ * rename.c - FUSE rename function
+ *
+ *  Created on: Mar 14, 2012
+ *      Author: mg
+ *
+ * Rename a file
+ *
+ **/
+
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fuse.h>
+
+
+int gn_rename(const char *from, const char *to)
+{
+       int ret=0;
+       return ret;
+}

Added: gnunet-fuse/src/ext/rmdir.c
===================================================================
--- gnunet-fuse/src/ext/rmdir.c                         (rev 0)
+++ gnunet-fuse/src/ext/rmdir.c 2012-03-19 15:04:30 UTC (rev 20607)
@@ -0,0 +1,21 @@
+/*
+ * rmdir.c - FUSE rmdir function
+ *
+ *  Created on: Mar 14, 2012
+ *      Author: mg
+ *
+ * Remove a directory
+ *
+ * */
+
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fuse.h>
+
+
+int gn_rmdir(const char *path)
+{
+       return 0;
+}

Added: gnunet-fuse/src/ext/truncate.c
===================================================================
--- gnunet-fuse/src/ext/truncate.c                              (rev 0)
+++ gnunet-fuse/src/ext/truncate.c      2012-03-19 15:04:30 UTC (rev 20607)
@@ -0,0 +1,20 @@
+/*
+ * truncate.c - FUSE truncate function
+ *
+ *  Created on: Mar 14, 2012
+ *      Author: mg
+ *
+ * Change the size of a file
+ *
+ * */
+
+#include <errno.h>
+#include <unistd.h>
+#include <fuse.h>
+
+
+int gn_truncate(const char *path, off_t size)
+{
+       int ret = 0;
+       return ret;
+}

Added: gnunet-fuse/src/ext/unlink.c
===================================================================
--- gnunet-fuse/src/ext/unlink.c                                (rev 0)
+++ gnunet-fuse/src/ext/unlink.c        2012-03-19 15:04:30 UTC (rev 20607)
@@ -0,0 +1,21 @@
+/*
+ * unlink.c - FUSE unlink function
+ *
+ *  Created on: Mar 14, 2012
+ *      Author: mg
+ *
+ * Remove a file
+ *
+ * */
+
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fuse.h>
+
+
+int gn_unlink(const char *path)
+{
+       return 0;
+}

Added: gnunet-fuse/src/ext/utimens.c
===================================================================
--- gnunet-fuse/src/ext/utimens.c                               (rev 0)
+++ gnunet-fuse/src/ext/utimens.c       2012-03-19 15:04:30 UTC (rev 20607)
@@ -0,0 +1,25 @@
+/*
+ * utimens.c - FUSE utimens function
+ *
+ *  Created on: Mar 14, 2012
+ *      Author: mg
+ *
+ *
+ * Change the access and modification times of a file with
+ * nanosecond resolution
+ *
+ * Introduced in version 2.6
+ */
+
+#include <sys/time.h>
+#include <string.h>
+#include <errno.h>
+#include <fuse.h>
+
+
+
+int gn_utimens(const char *path, const struct timespec ts[2])
+{
+       int ret = 0;
+       return ret;
+}

Added: gnunet-fuse/src/ext/write.c
===================================================================
--- gnunet-fuse/src/ext/write.c                         (rev 0)
+++ gnunet-fuse/src/ext/write.c 2012-03-19 15:04:30 UTC (rev 20607)
@@ -0,0 +1,26 @@
+/*
+ * write.c - FUSE write function
+ *
+ *  Created on: Mar 14, 2012
+ *      Author: mg
+ *
+ *      Write data to an open file
+ *
+ * Write should return exactly the number of bytes requested
+ * except on error.     An exception to this is when the 'direct_io'
+ * mount option is specified (see read operation).
+ *
+ * Changed in version 2.2
+ */
+
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fuse.h>
+
+
+int gn_write(const char *path, const char *buf, size_t size, off_t offset,
+       struct fuse_file_info *fi)
+{
+       return -ENOENT;
+}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]