aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-07-02 08:32:20 +0000
committerChristian Grothoff <christian@grothoff.org>2010-07-02 08:32:20 +0000
commit555214089c7045298f23fea9e060ea931804e75f (patch)
tree46a931f5ba6da92c9e350b808fee0f617e5d0f10 /src/fs
parent56aff3f29aa8cabb5e085610f1df50d537de1d9d (diff)
downloadgnunet-555214089c7045298f23fea9e060ea931804e75f.tar.gz
gnunet-555214089c7045298f23fea9e060ea931804e75f.zip
trying to port statvfs call to BSD
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/fs.h7
-rw-r--r--src/fs/fs_publish.c4
-rw-r--r--src/fs/gnunet-service-fs_indexing.c6
3 files changed, 11 insertions, 6 deletions
diff --git a/src/fs/fs.h b/src/fs/fs.h
index b3bf24e2a..838d74a2a 100644
--- a/src/fs/fs.h
+++ b/src/fs/fs.h
@@ -1860,13 +1860,18 @@ struct IndexStartMessage
1860 struct GNUNET_MessageHeader header; 1860 struct GNUNET_MessageHeader header;
1861 1861
1862 /** 1862 /**
1863 * For alignment.
1864 */
1865 uint32_t reserved GNUNET_PACKED;
1866
1867 /**
1863 * ID of device containing the file, as seen by the client. This 1868 * ID of device containing the file, as seen by the client. This
1864 * device ID is obtained using a call like "statvfs" (and converting 1869 * device ID is obtained using a call like "statvfs" (and converting
1865 * the "f_fsid" field to a 32-bit big-endian number). Use 0 if the 1870 * the "f_fsid" field to a 32-bit big-endian number). Use 0 if the
1866 * OS does not support this, in which case the service must do a 1871 * OS does not support this, in which case the service must do a
1867 * full hash recomputation. 1872 * full hash recomputation.
1868 */ 1873 */
1869 uint32_t device GNUNET_PACKED; 1874 uint64_t device GNUNET_PACKED;
1870 1875
1871 /** 1876 /**
1872 * Inode of the file on the given device, as seen by the client 1877 * Inode of the file on the given device, as seen by the client
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c
index 13701405e..71d309320 100644
--- a/src/fs/fs_publish.c
+++ b/src/fs/fs_publish.c
@@ -737,7 +737,7 @@ hash_for_index_cb (void *cls,
737 struct IndexStartMessage *ism; 737 struct IndexStartMessage *ism;
738 size_t slen; 738 size_t slen;
739 struct GNUNET_CLIENT_Connection *client; 739 struct GNUNET_CLIENT_Connection *client;
740 uint32_t dev; 740 uint64_t dev;
741 uint64_t ino; 741 uint64_t ino;
742 char *fn; 742 char *fn;
743 743
@@ -809,7 +809,7 @@ hash_for_index_cb (void *cls,
809 &dev, 809 &dev,
810 &ino)) 810 &ino))
811 { 811 {
812 ism->device = htonl (dev); 812 ism->device = GNUNET_htonll (dev);
813 ism->inode = GNUNET_htonll(ino); 813 ism->inode = GNUNET_htonll(ino);
814 } 814 }
815 else 815 else
diff --git a/src/fs/gnunet-service-fs_indexing.c b/src/fs/gnunet-service-fs_indexing.c
index b72c53fc0..0b815ed3b 100644
--- a/src/fs/gnunet-service-fs_indexing.c
+++ b/src/fs/gnunet-service-fs_indexing.c
@@ -342,9 +342,9 @@ GNUNET_FS_handle_index_start (void *cls,
342 uint16_t msize; 342 uint16_t msize;
343 struct IndexInfo *ii; 343 struct IndexInfo *ii;
344 size_t slen; 344 size_t slen;
345 uint32_t dev; 345 uint64_t dev;
346 uint64_t ino; 346 uint64_t ino;
347 uint32_t mydev; 347 uint64_t mydev;
348 uint64_t myino; 348 uint64_t myino;
349 349
350 msize = ntohs(message->size); 350 msize = ntohs(message->size);
@@ -364,7 +364,7 @@ GNUNET_FS_handle_index_start (void *cls,
364 GNUNET_SYSERR); 364 GNUNET_SYSERR);
365 return; 365 return;
366 } 366 }
367 dev = ntohl (ism->device); 367 dev = GNUNET_ntohll (ism->device);
368 ino = GNUNET_ntohll (ism->inode); 368 ino = GNUNET_ntohll (ism->inode);
369 ism = (const struct IndexStartMessage*) message; 369 ism = (const struct IndexStartMessage*) message;
370 slen = strlen (fn) + 1; 370 slen = strlen (fn) + 1;