[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r20608 - gnunet-fuse/src/ext
From: |
gnunet |
Subject: |
[GNUnet-SVN] r20608 - gnunet-fuse/src/ext |
Date: |
Mon, 19 Mar 2012 17:24:35 +0100 |
Author: mauricio
Date: 2012-03-19 17:24:35 +0100 (Mon, 19 Mar 2012)
New Revision: 20608
Modified:
gnunet-fuse/src/ext/getattr.c
gnunet-fuse/src/ext/open.c
gnunet-fuse/src/ext/read.c
gnunet-fuse/src/ext/readdir.c
Log:
-working changes: "Transport endpoint is not connected" fixed
Modified: gnunet-fuse/src/ext/getattr.c
===================================================================
--- gnunet-fuse/src/ext/getattr.c 2012-03-19 15:04:30 UTC (rev 20607)
+++ gnunet-fuse/src/ext/getattr.c 2012-03-19 16:24:35 UTC (rev 20608)
@@ -13,33 +13,42 @@
*/
#include <sys/stat.h>
-#include <string.h>
-#include <errno.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);
+ //GNUNET_break (0);
memset(stbuf, 0, sizeof(struct stat));
- if(strcmp(path, "/") == 0)
+ if(strcmp(path, "/home/mg/gnunet-fuse5/gnunet-fuse/src/ext/mount") == 0)
{
stbuf->st_mode = S_IFDIR | 0755;
- stbuf->st_nlink = 2;
+ stbuf->st_nlink = 1; // changed from 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;
Modified: gnunet-fuse/src/ext/open.c
===================================================================
--- gnunet-fuse/src/ext/open.c 2012-03-19 15:04:30 UTC (rev 20607)
+++ gnunet-fuse/src/ext/open.c 2012-03-19 16:24:35 UTC (rev 20608)
@@ -22,8 +22,8 @@
* Changed in version 2.2
*/
-#include <string.h>
-#include <errno.h>
+//#include <string.h>
+//#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fuse.h>
@@ -35,7 +35,7 @@
{
- if (strcmp(path, directory) | strcmp(path, "/") == 0)
+ if (strcmp(path, "/home/mg/gnunet-fuse5/gnunet-fuse/src/ext/mount") |
strcmp(path, "/") == 0)
return 0;
else if ((fi->flags & 3) != O_RDONLY)
Modified: gnunet-fuse/src/ext/read.c
===================================================================
--- gnunet-fuse/src/ext/read.c 2012-03-19 15:04:30 UTC (rev 20607)
+++ gnunet-fuse/src/ext/read.c 2012-03-19 16:24:35 UTC (rev 20608)
@@ -17,8 +17,8 @@
* Changed in version 2.2
*/
-#include <string.h>
-#include <errno.h>
+//#include <string.h>
+//#include <errno.h>
#include <unistd.h>
#include <fuse.h>
#include <gnunet-fuse.h>
@@ -30,9 +30,9 @@
struct fuse_file_info *fi)
{
size_t len;
- if (strcmp(path, directory) == 0)
+ if (strcmp(path, "/home/mg/gnunet-fuse5/gnunet-fuse/src/ext/mount") ==
0)
{
- len = strlen(directory);
+ len = strlen("/home/mg/gnunet-fuse5/gnunet-fuse/src/ext/mount");
if (offset < len)
{
Modified: gnunet-fuse/src/ext/readdir.c
===================================================================
--- gnunet-fuse/src/ext/readdir.c 2012-03-19 15:04:30 UTC (rev 20607)
+++ gnunet-fuse/src/ext/readdir.c 2012-03-19 16:24:35 UTC (rev 20608)
@@ -30,8 +30,8 @@
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
-#include <string.h>
-#include <errno.h>
+//#include <string.h>
+//#include <errno.h>
//#include <glib.h>
#include <fuse.h>
//#include <GNUnet/gnunet_ecrs_lib.h>
@@ -45,17 +45,22 @@
off_t offset, struct fuse_file_info *fi)
{
- static char* track = "directory/mal";
- int len = strlen(directory);
+ //char* track = "mal";
+ //char var[strlen(directory)+strlen(track)+1];
+ //memcpy(var,directory,strlen(directory));
+ //int len = strlen(directory);
+// GNUNET_asprintf();
-
- if (strcmp(path, "/") == 0)
+ if (strcmp(path, "/home/mg/gnunet-fuse5/gnunet-fuse/src/ext/mount") ==
0)
{
filler(buf, ".", NULL, 0);
filler(buf, "..", NULL, 0);
- filler(buf, directory+1, NULL, 0);
+ filler(buf,
"/home/mg/gnunet-fuse5/gnunet-fuse/src/ext/mount"+1, NULL, 0);
return 0;
}
+
+ /*
+
else if (strcmp(path, directory) == 0) // mounted directory with
content
{
filler(buf, ".", NULL, 0);
@@ -64,6 +69,8 @@
return 0;
}
+ */
+
else return -ENOENT;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r20608 - gnunet-fuse/src/ext,
gnunet <=