summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-06-11 14:18:11 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-06-18 09:45:00 +0000
commit64b4ddae33c373ac19850d36970a827ba360744c (patch)
tree531c9a0577339e16cbc12c12cc0eca65307eb96c
parent8af4e3a8830d29456f2cd24b0e779ebe592a0b60 (diff)
downloadbuildstream-64b4ddae33c373ac19850d36970a827ba360744c.tar.gz
_fuse: match SafeHardlinkOps to base class
Update signatures of SafeHardlinkOps methods to match the fuse.Operations base class. This helps ensure there's no confusion about what the arguments are for, and that SafeHardlinkOps can actually be substituted for any other Operations subclass.
-rw-r--r--src/buildstream/_fuse/hardlinks.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/buildstream/_fuse/hardlinks.py b/src/buildstream/_fuse/hardlinks.py
index a9756ac79..bcc2eeaa3 100644
--- a/src/buildstream/_fuse/hardlinks.py
+++ b/src/buildstream/_fuse/hardlinks.py
@@ -100,9 +100,9 @@ class SafeHardlinkOps(Operations):
###########################################################
# Fuse Methods #
###########################################################
- def access(self, path, mode):
+ def access(self, path, amode):
full_path = self._full_path(path)
- if not os.access(full_path, mode):
+ if not os.access(full_path, amode):
raise FuseOSError(errno.EACCES)
def chmod(self, path, mode):
@@ -197,13 +197,13 @@ class SafeHardlinkOps(Operations):
self._ensure_copy(full_path)
return os.open(full_path, flags, mode)
- def read(self, path, length, offset, fh):
+ def read(self, path, size, offset, fh):
os.lseek(fh, offset, os.SEEK_SET)
- return os.read(fh, length)
+ return os.read(fh, size)
- def write(self, path, buf, offset, fh):
+ def write(self, path, data, offset, fh):
os.lseek(fh, offset, os.SEEK_SET)
- return os.write(fh, buf)
+ return os.write(fh, data)
def truncate(self, path, length, fh=None):
full_path = self._full_path(path)
@@ -216,5 +216,5 @@ class SafeHardlinkOps(Operations):
def release(self, path, fh):
return os.close(fh)
- def fsync(self, path, fdatasync, fh):
+ def fsync(self, path, datasync, fh):
return self.flush(path, fh)