summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/blob.cpp7
-rw-r--r--src/blob.h7
-rw-r--r--src/repoList.cpp8
-rw-r--r--src/repoList.h1
-rw-r--r--unittests/config.cpp2
-rw-r--r--unittests/core.cpp6
6 files changed, 21 insertions, 10 deletions
diff --git a/src/blob.cpp b/src/blob.cpp
index a5482df..2211736 100644
--- a/src/blob.cpp
+++ b/src/blob.cpp
@@ -38,7 +38,7 @@ GitFS::Blob::close(const ::Ice::Current & current)
}
NetFS::Attr
-GitFS::Blob::fgetattr(ReqEnv, const ::Ice::Current &)
+GitFS::Blob::fgetattr(const ::Ice::Current &)
{
NetFS::Attr a;
a << *blob << *entry << *repo->commit;
@@ -60,13 +60,14 @@ GitFS::Blob::read(long long int o, long long int s, const ::Ice::Current &)
}
void
-GitFS::Blob::ftruncate(ReqEnv, long long int, const ::Ice::Current &)
+GitFS::Blob::ftruncate(long long int, const ::Ice::Current &)
{
throw NetFS::SystemError(EROFS);
}
void
-GitFS::Blob::write(long long int, long long int, Buffer, const ::Ice::Current &)
+GitFS::Blob::write(
+ long long int, long long int, std::pair<const Ice::Byte *, const Ice::Byte *>, const ::Ice::Current &)
{
throw NetFS::SystemError(EROFS);
}
diff --git a/src/blob.h b/src/blob.h
index 24e8c6f..0b2f6e7 100644
--- a/src/blob.h
+++ b/src/blob.h
@@ -18,10 +18,11 @@ namespace GitFS {
Blob(const Repo * const r, std::string &&);
void close(const ::Ice::Current & current) override;
- Attr fgetattr(ReqEnv env, const ::Ice::Current & current) override;
+ Attr fgetattr(const ::Ice::Current & current) override;
Buffer read(long long int offset, long long int size, const ::Ice::Current & current) override;
- void ftruncate(ReqEnv env, long long int size, const ::Ice::Current & current) override;
- void write(long long int offset, long long int size, Buffer data, const ::Ice::Current & current) override;
+ void ftruncate(long long int size, const ::Ice::Current & current) override;
+ void write(long long int offset, long long int size, std::pair<const Ice::Byte *, const Ice::Byte *> data,
+ const ::Ice::Current & current) override;
long long int copyrange(
FilePrxPtr, long long int, long long int, long long int, int, const Ice::Current &) override;
diff --git a/src/repoList.cpp b/src/repoList.cpp
index 2a50421..7a69b78 100644
--- a/src/repoList.cpp
+++ b/src/repoList.cpp
@@ -1,5 +1,6 @@
#include "repoList.h"
#include "repo.h"
+#include <Ice/Communicator.h>
#include <Ice/Current.h>
#include <Ice/ObjectAdapter.h>
#include <Ice/Properties.h>
@@ -33,3 +34,10 @@ GitFS::RepoList::connect(const ::std::string volume, const ::std::string auth, c
}
return Ice::uncheckedCast<NetFS::VolumePrx>(ice.adapter->addWithUUID(std::make_shared<Repo>(propReader)));
}
+
+NetFS::SettingsPtr
+GitFS::RepoList::getSettings(const ::Ice::Current & ice)
+{
+ const auto props = ice.adapter->getCommunicator()->getProperties();
+ return std::make_shared<NetFS::Settings>(props->getPropertyAsIntWithDefault("Ice.MessageSizeMax", 1024));
+}
diff --git a/src/repoList.h b/src/repoList.h
index d32f3b0..7995136 100644
--- a/src/repoList.h
+++ b/src/repoList.h
@@ -16,6 +16,7 @@ namespace GitFS {
NetFS::VolumePrxPtr connect(
const ::std::string volume, const ::std::string auth, const ::Ice::Current & current) override;
+ NetFS::SettingsPtr getSettings(const ::Ice::Current & current) override;
private:
const Ice::PropertiesPtr properties;
diff --git a/unittests/config.cpp b/unittests/config.cpp
index 6e3f92c..f6a914e 100644
--- a/unittests/config.cpp
+++ b/unittests/config.cpp
@@ -62,7 +62,7 @@ BOOST_DATA_TEST_CASE(uid_gid_override_fgetattr, USERS * GROUPS * FILES, uid, gid
BOOST_CHECK_NO_THROW(c.s->ice_ping());
auto file = c.v->open(c.env, path, {});
- auto attr = file->fgetattr(c.env);
+ auto attr = file->fgetattr();
BOOST_CHECK_EQUAL(attr.uid, uid);
BOOST_CHECK_EQUAL(attr.gid, gid);
file->close();
diff --git a/unittests/core.cpp b/unittests/core.cpp
index e64ae80..fb2f477 100644
--- a/unittests/core.cpp
+++ b/unittests/core.cpp
@@ -307,7 +307,7 @@ BOOST_DATA_TEST_CASE(openFileROFSOps, REGPATHS + EXECPATHS, path)
{
auto f = v->open(env, path, O_RDONLY);
BOOST_REQUIRE(f);
- BOOST_CHECK_THROW_SYSTEMERROR(f->ftruncate(env, {}), EROFS);
+ BOOST_CHECK_THROW_SYSTEMERROR(f->ftruncate({}), EROFS);
BOOST_CHECK_THROW_SYSTEMERROR(f->write({}, {}, {}), EROFS);
f->close();
}
@@ -316,7 +316,7 @@ BOOST_DATA_TEST_CASE(openFileGetAttr, REGPATHS + EXECPATHS, path)
{
auto f = v->open(env, path, O_RDONLY);
BOOST_REQUIRE(f);
- const auto attr = f->fgetattr(env);
+ const auto attr = f->fgetattr();
BOOST_CHECK(S_ISREG(attr.mode));
BOOST_CHECK_EQUAL(attr.size, attr.blocks);
BOOST_CHECK_EQUAL(1, attr.blockSize);
@@ -331,7 +331,7 @@ BOOST_DATA_TEST_CASE(openFileRead, REGPATHS + EXECPATHS, path)
auto f = v->open(env, path, O_RDONLY);
BOOST_REQUIRE(f);
- const auto attr = f->fgetattr(env);
+ const auto attr = f->fgetattr();
const auto readAll = f->read(0, attr.size);
BOOST_CHECK_EQUAL(attr.size, readAll.size());