[Python-modules-commits] [python-llfuse] 01/09: Import python-llfuse_0.42.1+dfsg.orig.tar.gz
Nikolaus Rath
nikratio-guest at moszumanska.debian.org
Mon Feb 1 16:49:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
nikratio-guest pushed a commit to branch master
in repository python-llfuse.
commit 1de78f8c7c630dbc2338f5a51ed35328e2f79449
Author: Nikolaus Rath <Nikolaus at rath.org>
Date: Mon Feb 1 08:21:50 2016 -0800
Import python-llfuse_0.42.1+dfsg.orig.tar.gz
---
Changes.rst | 263 +
Changes.txt | 189 -
Include/fuse_common.pxd | 39 +-
Include/fuse_lowlevel.pxd | 63 +-
Include/libc/errno.pxd | 23 -
Include/libc/sys/stat.pxd | 33 -
Include/libc/sys/statvfs.pxd | 5 +-
Include/libc/sys/types.pxd | 24 -
Include/libc/xattr.pxd | 59 -
Include/pthread.pxd | 49 +
PKG-INFO | 21 +-
README.rst | 19 +-
examples/lltest.py | 48 +-
examples/passthroughfs.py | 119 +-
examples/tmpfs.py | 77 +-
rst/about.rst | 5 +-
rst/changes.rst | 1 +
rst/conf.py | 2 +-
rst/data.rst | 82 +-
rst/example.rst | 36 +-
rst/fuse_api.rst | 6 +-
rst/general.rst | 79 +
rst/getting_started.rst | 20 -
rst/gotchas.rst | 30 +
rst/index.rst | 10 +-
rst/install.rst | 15 +-
rst/util.rst | 14 +
setup.py | 125 +-
src/darwin_compat.c | 247 +
src/darwin_compat.h | 49 +
src/fuse_api.pxi | 627 +
src/gettime.h | 59 +
src/{llfuse => }/handlers.pxi | 461 +-
src/llfuse.c | 49713 +++++++++++++++++++++++++++++++++++++
src/llfuse.egg-info/PKG-INFO | 21 +-
src/llfuse.egg-info/SOURCES.txt | 55 +-
src/llfuse.egg-info/requires.txt | 1 +
src/llfuse.h | 36 +
src/llfuse.pyx | 173 +
src/llfuse/__init__.py | 18 -
src/llfuse/capi.c | 20 -
src/llfuse/capi.pyx | 131 -
src/llfuse/capi_darwin.c | 32113 ------------------------
src/llfuse/capi_freebsd.c | 31314 -----------------------
src/llfuse/capi_linux.c | 31552 -----------------------
src/llfuse/fuse_api.pxi | 401 -
src/llfuse/misc.pxi | 341 -
src/llfuse/pyapi.py | 592 -
src/llfuse/version.c | 20 -
src/{llfuse => }/lock.c | 7 +-
src/lock.h | 22 +
src/{llfuse/time.c => macros.c} | 32 +-
src/misc.pxi | 617 +
src/operations.pxi | 537 +
src/xattr.h | 106 +
test/conftest.py | 21 +-
test/pytest.ini | 2 +-
test/test_api.py | 83 +
test/test_examples.py | 154 +-
test/test_fs.py | 241 +
test/util.py | 123 +
61 files changed, 53918 insertions(+), 97427 deletions(-)
diff --git a/Changes.rst b/Changes.rst
new file mode 100644
index 0000000..56e7f02
--- /dev/null
+++ b/Changes.rst
@@ -0,0 +1,263 @@
+===========
+ Changelog
+===========
+
+.. currentmodule:: llfuse
+
+Release 0.42.1 (2016-02-01)
+===========================
+
+* Include HTML documentation.
+
+Release 0.42 (2016-01-30)
+=========================
+
+* The documentation has been clarified and extended - please take a
+ look even if you're already familiar with Python-LLFUSE.
+
+* Extended coverage of unit tests.
+
+* Fixed a compile error under OS-X.
+
+* Added `notify_store` function.
+
+* Added `get_sup_groups` function.
+
+* The `~Operations.read` handler may now return arbitrary objects that
+ as long as they implement the buffer protocol.
+
+* Implemented a *forget_multi* handler (used behind the scenes).
+
+* Many classes were rewritten in Cython for improved performance.
+
+* Python thread-specific data is now initialized only once rather
+ than every time a handler is called.
+
+* SIGINT (Ctrl-C) now properly terminates `llfuse.main` also when
+ running with multiple workers.
+
+* The return value of `llfuse.main` now indicates if the loop was
+ terminated due to an unmount request or due to a signal.
+
+BACKWARDS INCOMPATIBLE CHANGES:
+
+* Ducktyping the `EntryAttributes` class is no longer allowed,
+ `Operations` methods must return instances of this class (rather
+ than any object that provides the neccessary attributes).
+
+* The `!st_Xtime` attributes of the `EntryAttributes` have been
+ dropped in favor of the `!st_Xtime_ns` attributes.
+
+* The `setattr` method now always receives a completely filled
+ `EntryAttributes` instance. To determine which attributes should
+ be changed, a new *fields* argument has been introduced.
+
+* The `~Operations.setattr` method now also receives an *fh*
+ parameter.
+
+* The `llfuse.main` function now has a *workers* parameter, and
+ the *single* parameter was dropped.
+
+* Almost all request handlers now receive a `RequestContext`
+ instance in an additional parameter.
+
+Release 0.41.1 (2015-08-22)
+===========================
+
+* Added some files in :file:`test/` that were missing in the 0.41
+ tarball. Tests now support the ``--installed`` option, produce
+ prettier output, and check for error messages printed to stderr or
+ stdout.
+
+* Python-LLFUSE can now also be built on NetBSD.
+
+* Added support for FUSE_SET_ATTR_ATIME_NOW and
+ FUSE_SET_ATTR_MTIME_NOW setattr flags. Previosly, these would be
+ silently ignored.
+
+* Fixed an AssertionError in :file:`examples/passthroughfs.py`
+
+Release 0.41 (2015-08-20)
+=========================
+
+* Fixed a syntax error in contrib/tmpfs.py
+* Introduced an `!llfuse.__version__` attribute.
+* Added more reasonable default values for `llfuse.EntryAttributes`.
+* Added new minimal example, :file:`examples/lltest.py`.
+* Added unit tests.
+* Added an example for a pass-through file system,
+ :file:`examples/passthroughfs.py`.
+
+Release 0.40 (2013-11-26)
+=========================
+
+* Re-raising an exception from a request handler now works
+ correctly under Python 3. Problems were caused by a Cython bug,
+ but llfuse now works around the issue.
+
+* File atime, ctime and mtime can now also be represented as
+ nanosecond integer values for increased resolution. Thanks to
+ nagy.attila at gmail.com for the initial patch.
+
+* Python-llfuse no longer includes the setuptools/distribute
+ bootstrap script. This module thus has to be installed manually
+ if not already present on the system.
+
+* Duck-typing of the Operations instance is now supported.
+
+* Python-llfuse no longer requires a re-compilation of the
+ Cython code (setup.py build_cython step) when compiling for MacOS
+ or FreeBSD.
+
+* Extended attributes are now properly supported under FreeBSD.
+
+Release 0.39 (2013-05-11)
+=========================
+
+* When running under Python 3.x, several functions now work with
+ string objects rather than byte objects:
+
+ - llfuse.init(): the *mountpoint* argument, and the elements of
+ the *fuse_opts* argument are expected to be of type str.
+
+ - llfuse.listdir(): the *path* argument is expected to be of
+ type str, and the values returned by the iterator will be of
+ type str as well.
+
+ - llfuse.getxattr(), llfuse.setxattr(): the *path* and *name*
+ arguments are expected to be of type str.
+
+ When necessary, values will be converted to the file system
+ encoding using the surrogatescape handler as described in PEP 383
+ (http://www.python.org/dev/peps/pep-0383/)
+
+* Renamed get_off_t_bytes() and get_ino_t_bytes() to
+ get_off_t_bits() and get_ino_t_bits() and documented them.
+
+Release 0.38 (2013-01-05)
+=========================
+
+* Various small bugfixes.
+
+Release 0.37.1 (2011-12-10)
+===========================
+
+* Fixed a segfault-causing race condition in Lock.acquire() and
+ Lock.yield().
+
+Release 0.37 (2011-12-05)
+=========================
+
+* Explicitly call fuse_chan_destroy() in llfuse.close(), so
+ that the mountpoint becomes inaccessible right away, even
+ while the process is still running.
+
+* Added get_ino_t_bytes() and get_off_t_bytes() that return
+ the number of bytes used for representing inode numbers
+ and file offsets.
+
+* The yield_() method of the global lock now takes an additional
+ *count* argument that can be used to yield the lock more than
+ once.
+
+* Changed implementation of global lock. The global lock is
+ no longer a mutex, but a boolean variable protected by a mutex,
+ and changes are tracked with a condition object. This allows
+ lock.yield() to work properly: if there are other threads waiting
+ for the lock, they are guaranteed to run. If there are no other
+ threads waiting for the lock, execution of the active thread
+ continues immediately.
+
+ The previous implementation using sched_yield() was mostly
+ broken: threads trying to acquire the global lock were calling
+ pthread_mutex_lock, so they got removed from the kernels
+ runqueue. However, calls to sched_yield() would just put the
+ active thread into the expired runqueue, and calls to
+ pthread_mutex_unlock apparently do not synchronously move the
+ threads waiting for the lock back to a runqueue. Therefore, most
+ of the time the active thread would be the only thread in any
+ runqueue and thus continue to run.
+
+* The Operations.forget() method now receives a list of
+ (inode, nlookup) tuples rather than just one such tuple.
+
+* invalidate_entry() and invalidate_inode() no longer work
+ synchronously. Instead, the message is put in a queue and send by
+ a background thread.
+
+* The acquire() method of the global lock now has an optional
+ *timeout* parameter.
+
+* The create() request handler now receives the open flags
+ as an additional parameter.
+
+Release 0.36 (2011-09-20)
+=========================
+
+* Don't send SIGHUP if exception is encountered in destroy()
+ handler (since at that point, main loop has already terminated
+ and signal handling been reset).
+
+* Fix a problem with request handler exceptions being re-raised
+ not only in llfuse.main(), but also in llfuse.close() when
+ running single threaded.
+
+Release 0.35 (2011-09-14)
+=========================
+
+* Explicitly initialize Python thread support. Previously, calling
+ llfuse.main() resulted in a crash if no Python threads were used
+ before the call.
+
+* Removed handle_exc() method. If request handle raise an exception,
+ the main loop now terminates and the exception is re-raised and
+ passed to the caller of llfuse.main().
+
+* llfuse.close() can now leave the mountpoint in an inaccessible
+ state to signal a shutdown due to an internal file system
+ error.
+
+* The destroy() request handler is now called without the
+ global lock acquired. This makes sense, because it's not called
+ as part of the main loop but by llfuse.close().
+
+Release 0.34 (2011-08-10)
+=========================
+
+* Explicitly cast S_* constants to mode_t to prevent compiler
+ warnings on FreeBSD.
+
+* Fixed initialization error under Python 3.
+
+Release 0.33 (2011-07-03)
+=========================
+
+* Various small bugfixes.
+
+Release 0.32 (2011-06-04)
+=========================
+
+* Fixed unlink() bug in contrib/example.py
+
+* Include :file:`src/*.pxi` files in release tarball. Were
+ accidentally omitted in previous version.
+
+* Moved debian/ directory into separate repository.
+
+Release 0.31 (2011-05-12)
+=========================
+
+* Use long for storing nanoseconds in file [amc]times, not int.
+
+Release 0.30 (2011-03-08)
+=========================
+
+* Fixed compile errors with Python 3.0 and 3.1.
+* Fixed error handling, errno is now read correctly.
+* Documentation is now shipped in tarball rather than generated
+ during installation.
+
+Release 0.29 (2010-12-30)
+=========================
+
+* Initial release
diff --git a/Changes.txt b/Changes.txt
deleted file mode 100644
index e25d204..0000000
--- a/Changes.txt
+++ /dev/null
@@ -1,189 +0,0 @@
-2015-08-22, python-llfuse 0.41.1
-
- * Added some files in test/ that were missing in the 0.41 tarball.
- Tests now support the --installed option, produce prettier output,
- and check for error messages printed to stderr or stdout.
-
- * Python-LLFUSE can now also be built on NetBSD.
-
- * Added support for FUSE_SET_ATTR_ATIME_NOW and
- FUSE_SET_ATTR_MTIME_NOW setattr flags. Previosly, these would be
- silently ignored.
-
- * Fixed an AssertionError in examples/passthroughfs.py
-
-2015-08-20, python-llfuse 0.41
-
- * Fixed a syntax error in contrib/tmpfs.py
- * Introduced an `llfuse.__version__` attribute.
- * Added more reasonable default values for `llfuse.EntryAttributes`.
- * Added new minimal example, `examples/lltest.py`.
- * Added unit tests.
- * Added an example for a pass-through file system,
- `examples/passthroughfs.py`.
-
-2013-11-26, python-llfuse 0.40
-
- * Re-raising an exception from a request handler now works
- correctly under Python 3. Problems were caused by a Cython bug,
- but llfuse now works around the issue.
-
- * File atime, ctime and mtime can now also be represented as
- nanosecond integer values for increased resolution. Thanks to
- nagy.attila at gmail.com for the initial patch.
-
- * Python-llfuse no longer includes the setuptools/distribute
- bootstrap script. This module thus has to be installed manually
- if not already present on the system.
-
- * Duck-typing of the Operations instance is now supported.
-
- * Python-llfuse no longer requires a re-compilation of the
- Cython code (setup.py build_cython step) when compiling for MacOS
- or FreeBSD.
-
- * Extended attributes are now properly supported under FreeBSD.
-
-2013-05-11, llfuse 0.39
-
- * When running under Python 3.x, several functions now work with
- string objects rather than byte objects:
-
- - llfuse.init(): the *mountpoint* argument, and the elements of
- the *fuse_opts* argument are expected to be of type str.
-
- - llfuse.listdir(): the *path* argument is expected to be of
- type str, and the values returned by the iterator will be of
- type str as well.
-
- - llfuse.getxattr(), llfuse.setxattr(): the *path* and *name*
- arguments are expected to be of type str.
-
- When necessary, values will be converted to the file system
- encoding using the surrogatescape handler as described in PEP 383
- (http://www.python.org/dev/peps/pep-0383/)
-
- * Renamed get_off_t_bytes() and get_ino_t_bytes() to
- get_off_t_bits() and get_ino_t_bits() and documented them.
-
-2013-01-05, llfuse 0.38
-
- * Various small bugfixes.
-
-2011-12-10, llfuse 0.37.1
-
- * Fixed a segfault-causing race condition in Lock.acquire() and
- Lock.yield().
-
-2011-12-05, llfuse 0.37
-
- * Explicitly call fuse_chan_destroy() in llfuse.close(), so
- that the mountpoint becomes inaccessible right away, even
- while the process is still running.
-
- * Added get_ino_t_bytes() and get_off_t_bytes() that return
- the number of bytes used for representing inode numbers
- and file offsets.
-
- * The yield_() method of the global lock now takes an additional
- *count* argument that can be used to yield the lock more than
- once.
-
- * Changed implementation of global lock. The global lock is
- no longer a mutex, but a boolean variable protected by a mutex,
- and changes are tracked with a condition object. This allows
- lock.yield() to work properly: if there are other threads waiting
- for the lock, they are guaranteed to run. If there are no other
- threads waiting for the lock, execution of the active thread
- continues immediately.
-
- The previous implementation using sched_yield() was mostly
- broken: threads trying to acquire the global lock were calling
- pthread_mutex_lock, so they got removed from the kernels
- runqueue. However, calls to sched_yield() would just put the
- active thread into the expired runqueue, and calls to
- pthread_mutex_unlock apparently do not synchronously move the
- threads waiting for the lock back to a runqueue. Therefore, most
- of the time the active thread would be the only thread in any
- runqueue and thus continue to run.
-
- * The Operations.forget() method now receives a list of
- (inode, nlookup) tuples rather than just one such tuple.
-
- * invalidate_entry() and invalidate_inode() no longer work
- synchronously. Instead, the message is put in a queue and send by
- a background thread.
-
- * The acquire() method of the global lock now has an optional
- *timeout* parameter.
-
- * The create() request handler now receives the open flags
- as an additional parameter.
-
-2011-09-20, llfuse 0.36
-
- * Don't send SIGHUP if exception is encountered in destroy()
- handler (since at that point, main loop has already terminated
- and signal handling been reset).
-
- * Fix a problem with request handler exceptions being re-raised
- not only in llfuse.main(), but also in llfuse.close() when
- running single threaded.
-
-2011-09-14, llfuse 0.35
-
- * Explicitly initialize Python thread support. Previously, calling
- llfuse.main() resulted in a crash if no Python threads were used
- before the call.
-
- * Removed handle_exc() method. If request handle raise an exception,
- the main loop now terminates and the exception is re-raised and
- passed to the caller of llfuse.main().
-
- * llfuse.close() can now leave the mountpoint in an inaccessible
- state to signal a shutdown due to an internal file system
- error.
-
- * The destroy() request handler is now called without the
- global lock acquired. This makes sense, because it's not called
- as part of the main loop but by llfuse.close().
-
-2011-08-10, llfuse 0.34
-
- * Explicitly cast S_* constants to mode_t to prevent compiler
- warnings on FreeBSD.
-
- * Fixed initialization error under Python 3.
-
-
-2011-07-03, llfuse 0.33
-
- * Various small bugfixes.
-
-
-2011-06-04, llfuse 0.32
-
- * Fixed unlink() bug in contrib/example.py
-
- * Include src/*.pxi files in release tarball. Were
- accidentally omitted in previous version.
-
- * Moved debian/ directory into separate repository.
-
-
-2011-05-12, llfuse 0.31
-
- * Use long for storing nanoseconds in file [amc]times, not int.
-
-
-2011-03-08, llfuse 0.30
-
- * Fixed compile errors with Python 3.0 and 3.1.
- * Fixed error handling, errno is now read correctly.
- * Documentation is now shipped in tarball rather than generated
- during installation.
-
-
-2010-12-30, llfuse 0.29
-
- * Initial release
diff --git a/Include/fuse_common.pxd b/Include/fuse_common.pxd
index 32fe681..03e4bca 100644
--- a/Include/fuse_common.pxd
+++ b/Include/fuse_common.pxd
@@ -10,9 +10,10 @@ the terms of the GNU LGPL.
'''
from fuse_opt cimport *
+from posix.types cimport off_t
from libc.stdint cimport uint64_t
-# Based on fuse sources, revision tag fuse_2_8_3
+# Based on fuse sources, revision tag fuse_2_9_4
cdef extern from * nogil: # fuse_common.h should not be included
struct fuse_file_info:
@@ -30,11 +31,43 @@ cdef extern from * nogil: # fuse_common.h should not be included
pass
struct fuse_chan:
- pass
-
+ pass
fuse_chan *fuse_mount(char *mountpoint, fuse_args *args)
void fuse_unmount(char *mountpoint, fuse_chan *ch)
int fuse_set_signal_handlers(fuse_session *se)
void fuse_remove_signal_handlers(fuse_session *se)
+ # fuse_common.h declares these as enums, but they are
+ # actually flags (i.e., FUSE_BUF_IS_FD|FUSE_BUF_FD_SEEK)
+ # is a valid variable. Therefore, we declare the type
+ # as integer instead.
+ ctypedef int fuse_buf_flags
+ enum:
+ FUSE_BUF_IS_FD
+ FUSE_BUF_FD_SEEK
+ FUSE_BUF_FD_RETRY
+
+ ctypedef int fuse_buf_copy_flags
+ enum:
+ FUSE_BUF_NO_SPLICE
+ FUSE_BUF_FORCE_SPLICE
+ FUSE_BUF_SPLICE_MOVE
+ FUSE_BUF_SPLICE_NONBLOCK
+
+ struct fuse_buf:
+ size_t size
+ fuse_buf_flags flags
+ void *mem
+ int fd
+ off_t pos
+
+ struct fuse_bufvec:
+ size_t count
+ size_t idx
+ size_t off
+ fuse_buf buf[1]
+
+ size_t fuse_buf_size(fuse_bufvec *bufv)
+ ssize_t fuse_buf_copy(fuse_bufvec *dst, fuse_bufvec *src,
+ fuse_buf_copy_flags flags)
diff --git a/Include/fuse_lowlevel.pxd b/Include/fuse_lowlevel.pxd
index 9cb1bf8..659540e 100644
--- a/Include/fuse_lowlevel.pxd
+++ b/Include/fuse_lowlevel.pxd
@@ -10,13 +10,13 @@ the terms of the GNU LGPL.
'''
from fuse_common cimport *
-from libc.sys.stat cimport *
-from libc.sys.types cimport *
+from posix.stat cimport *
+from posix.types cimport *
from libc.sys.statvfs cimport *
from libc.stdlib cimport const_char
from libc.stdint cimport uint32_t
-# Based on fuse sources, revision tag fuse_2_8_3
+# Based on fuse sources, revision tag fuse_2_9_4
cdef extern from "fuse_lowlevel.h" nogil:
int FUSE_ROOT_ID
@@ -30,7 +30,7 @@ cdef extern from "fuse_lowlevel.h" nogil:
struct fuse_entry_param:
fuse_ino_t ino
unsigned long generation
- stat attr
+ struct_stat attr
double attr_timeout
double entry_timeout
@@ -40,8 +40,11 @@ cdef extern from "fuse_lowlevel.h" nogil:
pid_t pid
mode_t umask
- ctypedef fuse_ctx const_fuse_ctx "const struct fuse_ctx"
+ struct fuse_forget_data:
+ uint64_t ino
+ uint64_t nlookup
+ ctypedef fuse_ctx const_fuse_ctx "const struct fuse_ctx"
int FUSE_SET_ATTR_MODE
int FUSE_SET_ATTR_UID
int FUSE_SET_ATTR_GID
@@ -51,18 +54,6 @@ cdef extern from "fuse_lowlevel.h" nogil:
int FUSE_SET_ATTR_ATIME_NOW
int FUSE_SET_ATTR_MTIME_NOW
- IF TARGET_PLATFORM == 'darwin':
- ctypedef void(*setxattr_fn_t)(fuse_req_t req, fuse_ino_t ino, const_char *name,
- const_char *value, size_t size, int flags,
- uint32_t position)
- ctypedef void(*getxattr_fn_t)(fuse_req_t req, fuse_ino_t ino, const_char *name,
- size_t size, uint32_t position)
- ELSE:
- ctypedef void(*setxattr_fn_t)(fuse_req_t req, fuse_ino_t ino, const_char *name,
- const_char *value, size_t size, int flags)
- ctypedef void(*getxattr_fn_t)(fuse_req_t req, fuse_ino_t ino, const_char *name,
- size_t size)
-
struct fuse_lowlevel_ops:
void (*init) (void *userdata, fuse_conn_info *conn)
void (*destroy) (void *userdata)
@@ -70,7 +61,7 @@ cdef extern from "fuse_lowlevel.h" nogil:
void (*forget) (fuse_req_t req, fuse_ino_t ino, ulong_t nlookup)
void (*getattr) (fuse_req_t req, fuse_ino_t ino,
fuse_file_info *fi)
- void (*setattr) (fuse_req_t req, fuse_ino_t ino, stat *attr,
+ void (*setattr) (fuse_req_t req, fuse_ino_t ino, struct_stat *attr,
int to_set, fuse_file_info *fi)
void (*readlink) (fuse_req_t req, fuse_ino_t ino)
void (*mknod) (fuse_req_t req, fuse_ino_t parent, const_char *name,
@@ -106,36 +97,56 @@ cdef extern from "fuse_lowlevel.h" nogil:
void (*fsyncdir) (fuse_req_t req, fuse_ino_t ino, int datasync,
fuse_file_info *fi)
void (*statfs) (fuse_req_t req, fuse_ino_t ino)
- setxattr_fn_t setxattr
- getxattr_fn_t getxattr
+ void (*setxattr) (fuse_req_t req, fuse_ino_t ino, const_char *name,
+ const_char *value, size_t size, int flags)
+ void (*getxattr) (fuse_req_t req, fuse_ino_t ino, const_char *name,
+ size_t size)
void (*listxattr) (fuse_req_t req, fuse_ino_t ino, size_t size)
void (*removexattr) (fuse_req_t req, fuse_ino_t ino, const_char *name)
void (*access) (fuse_req_t req, fuse_ino_t ino, int mask)
void (*create) (fuse_req_t req, fuse_ino_t parent, const_char *name,
mode_t mode, fuse_file_info *fi)
+ void (*write_buf) (fuse_req_t req, fuse_ino_t ino, fuse_bufvec *bufv,
+ off_t off, fuse_file_info *fi)
+ void (*retrieve_reply) (fuse_req_t req, void *cookie, fuse_ino_t ino,
+ off_t offset, fuse_bufvec *bufv)
+ void (*forget_multi) (fuse_req_t req, size_t count,
+ fuse_forget_data *forgets)
+ void (*fallocate) (fuse_req_t req, fuse_ino_t ino, int mode,
+ off_t offset, off_t length, fuse_file_info *fi)
int fuse_reply_err(fuse_req_t req, int err)
void fuse_reply_none(fuse_req_t req)
int fuse_reply_entry(fuse_req_t req, fuse_entry_param *e)
int fuse_reply_create(fuse_req_t req, fuse_entry_param *e,
fuse_file_info *fi)
- int fuse_reply_attr(fuse_req_t req, stat *attr,
+ int fuse_reply_attr(fuse_req_t req, struct_stat *attr,
double attr_timeout)
int fuse_reply_readlink(fuse_req_t req, const_char *link)
int fuse_reply_open(fuse_req_t req, fuse_file_info *fi)
int fuse_reply_write(fuse_req_t req, size_t count)
int fuse_reply_buf(fuse_req_t req, const_char *buf, size_t size)
+ int fuse_reply_data(fuse_req_t req, fuse_bufvec *bufv,
+ fuse_buf_copy_flags flags)
int fuse_reply_statfs(fuse_req_t req, statvfs *stbuf)
int fuse_reply_xattr(fuse_req_t req, size_t count)
size_t fuse_add_direntry(fuse_req_t req, const_char *buf, size_t bufsize,
- const_char *name, stat *stbuf,
+ const_char *name, struct_stat *stbuf,
off_t off)
int fuse_lowlevel_notify_inval_inode(fuse_chan *ch, fuse_ino_t ino,
off_t off, off_t len)
int fuse_lowlevel_notify_inval_entry(fuse_chan *ch, fuse_ino_t parent,
const_char *name, size_t namelen)
+ int fuse_lowlevel_notify_delete(fuse_chan *ch, fuse_ino_t parent,
+ fuse_ino_t child, const_char *name,
+ size_t namelen)
+ int fuse_lowlevel_notify_store(fuse_chan *ch, fuse_ino_t ino,
+ off_t offset, fuse_bufvec *bufv,
+ fuse_buf_copy_flags flags)
+ int fuse_lowlevel_notify_retrieve(fuse_chan *ch, fuse_ino_t ino,
+ size_t size, off_t offset, void *cookie);
void *fuse_req_userdata(fuse_req_t req)
fuse_ctx *fuse_req_ctx(fuse_req_t req)
@@ -150,8 +161,16 @@ cdef extern from "fuse_lowlevel.h" nogil:
fuse_session *fuse_session_new(fuse_session_ops *op, void *data)
void fuse_session_add_chan(fuse_session *se, fuse_chan *ch)
+ int fuse_session_receive_buf(fuse_session *se, fuse_buf *buf,
+ fuse_chan **chp)
+ void fuse_session_process_buf(fuse_session *se,
+ fuse_buf *buf, fuse_chan *ch)
void fuse_session_remove_chan(fuse_chan *ch)
+ void fuse_session_reset(fuse_session *se)
+ void fuse_session_exit(fuse_session *se)
void fuse_session_destroy(fuse_session *se)
int fuse_session_loop(fuse_session *se)
int fuse_session_loop_mt(fuse_session *se)
void fuse_chan_destroy(fuse_chan *ch)
+ size_t fuse_chan_bufsize(fuse_chan *ch)
+ int fuse_session_exited(fuse_session *se)
diff --git a/Include/libc/errno.pxd b/Include/libc/errno.pxd
deleted file mode 100644
index 09fdfbf..0000000
--- a/Include/libc/errno.pxd
+++ /dev/null
@@ -1,23 +0,0 @@
-'''
-errno.pxd
-
-This file contains Cython definitions for errno.h
-
-Copyright © 2010 Nikolaus Rath <Nikolaus.org>
-
-This file is part of Python-LLFUSE. This work may be distributed under
-the terms of the GNU LGPL.
-'''
-
-cdef extern from "errno.h" nogil:
-
- enum: EDOM
- enum: EILSEQ
- enum: ERANGE
- enum: ENOATTR
- enum: ENOSYS
- enum: ENOENT
- enum: EEXIST
- enum: EIO
-
- int errno
diff --git a/Include/libc/sys/stat.pxd b/Include/libc/sys/stat.pxd
deleted file mode 100644
index 2df8173..0000000
--- a/Include/libc/sys/stat.pxd
+++ /dev/null
@@ -1,33 +0,0 @@
-'''
-stat.pxd
-
-This file contains Cython definitions for sys/stat.h
-
-Copyright © 2010 Nikolaus Rath <Nikolaus.org>
-
-This file is part of Python-LLFUSE. This work may be distributed under
-the terms of the GNU LGPL.
-'''
-
-from libc.sys.types cimport *
-
-cdef extern from "sys/stat.h" nogil:
- enum st_mode_constants:
- S_IFMT
- S_IFDIR
-
- struct stat:
- dev_t st_dev
- ino_t st_ino
- mode_t st_mode
- nlink_t st_nlink
- uid_t st_uid
- gid_t st_gid
- dev_t st_rdev
- off_t st_size
- blksize_t st_blksize
- blkcnt_t st_blocks
- time_t st_atime
- time_t st_mtime
- time_t st_ctime
-
diff --git a/Include/libc/sys/statvfs.pxd b/Include/libc/sys/statvfs.pxd
index f2120ef..ed907e8 100644
--- a/Include/libc/sys/statvfs.pxd
+++ b/Include/libc/sys/statvfs.pxd
@@ -14,12 +14,11 @@ cdef extern from "sys/statvfs.h" nogil:
ctypedef int fsfilcnt_t
struct statvfs:
- int f_bsize
- int f_frsize
+ unsigned long f_bsize
+ unsigned long f_frsize
fsblkcnt_t f_blocks
fsblkcnt_t f_bfree
fsblkcnt_t f_bavail
fsfilcnt_t f_files
fsfilcnt_t f_ffree
fsfilcnt_t f_favail
-
diff --git a/Include/libc/sys/types.pxd b/Include/libc/sys/types.pxd
deleted file mode 100644
index 7454848..0000000
--- a/Include/libc/sys/types.pxd
+++ /dev/null
@@ -1,24 +0,0 @@
-'''
-types.pxd
-
-This file contains Cython definitions for sys/types.h
-
-Copyright © 2010 Nikolaus Rath <Nikolaus.org>
-
-This file is part of Python-LLFUSE. This work may be distributed under
-the terms of the GNU LGPL.
-'''
-
-cdef extern from "sys/types.h" nogil:
- ctypedef int pid_t
- ctypedef int dev_t
- ctypedef int ino_t
- ctypedef int mode_t
- ctypedef int nlink_t
- ctypedef int uid_t
- ctypedef int gid_t
- ctypedef int dev_t
- ctypedef int off_t
- ctypedef int blksize_t
- ctypedef int blkcnt_t
- ctypedef int time_t
diff --git a/Include/libc/xattr.pxd b/Include/libc/xattr.pxd
deleted file mode 100644
index 8a08394..0000000
--- a/Include/libc/xattr.pxd
+++ /dev/null
@@ -1,59 +0,0 @@
-'''
-xattr.pxd
-
-This file contains Cython definitions for attr/xattr.h
-
-Copyright © 2010 Nikolaus Rath <Nikolaus.org>
-
-This file is part of Python-LLFUSE. This work may be distributed under
-the terms of the GNU LGPL.
-'''
-
-IF TARGET_PLATFORM == 'darwin':
- cdef extern from "sys/xattr.h" nogil:
- int c_setxattr "setxattr" (char *path, char *name,
- void *value, int size,
- int flags, int options)
-
- int c_getxattr "getxattr" (char *path, char *name,
- void *value, int size,
- int position, int options)
-
- int XATTR_CREATE
- int XATTR_REPLACE
- int XATTR_NOFOLLOW
- int XATTR_NOSECURITY
- int XATTR_NODEFAULT
-
- cdef inline int setxattr (char *path, char *name,
- void *value, int size, int flags) nogil:
- return c_setxattr(path, name, value, size, flags, 0)
-
- cdef inline int getxattr (char *path, char *name,
- void *value, int size) nogil:
- return c_getxattr(path, name, value, size, 0, 0)
-
-ELIF TARGET_PLATFORM == 'freebsd':
- cdef extern from "sys/types.h":
- pass
-
- cdef extern from "sys/extattr.h" nogil:
-
- int extattr_set_file(char *path, int attrnamespace,
- char *attrname, void *data, int nbytes)
- int extattr_get_file(char *path, int attrnamespace,
- char *attrname, void *data, int nbytes)
-
- int EXTATTR_NAMESPACE_USER
- int EXTATTR_NAMESPACE_SYSTEM
-
-ELSE:
- cdef extern from "attr/xattr.h" nogil:
- int setxattr (char *path, char *name,
- void *value, int size, int flags)
-
- int getxattr (char *path, char *name,
- void *value, int size)
-
- int XATTR_CREATE
- int XATTR_REPLACE
diff --git a/Include/pthread.pxd b/Include/pthread.pxd
new file mode 100644
index 0000000..56d97f4
--- /dev/null
+++ b/Include/pthread.pxd
@@ -0,0 +1,49 @@
+'''
+pthreads.pxd
+
+This file contains Cython definitions for pthread.h
+
+Copyright © 2015 Nikolaus Rath <Nikolaus.org>
+
+This file is part of Python-LLFUSE. This work may be distributed under
+the terms of the GNU LGPL.
+'''
+
+from posix.signal cimport sigset_t
+
+cdef extern from "pthread.h" nogil:
+ # POSIX says this might be a struct, but CPython (and llfuse)
+ # rely on it being an integer.
+ ctypedef int pthread_t
+
+ ctypedef struct pthread_attr_t:
+ pass
+ ctypedef struct pthread_mutexattr_t:
+ pass
+ ctypedef struct pthread_mutex_t:
+ pass
+
+ enum:
+ PTHREAD_CANCEL_ENABLE
+ PTHREAD_CANCEL_DISABLE
+
+ int pthread_cancel(pthread_t thread)
+ int pthread_setcancelstate(int state, int *oldstate)
+ pthread_t pthread_self()
+ int pthread_sigmask(int how, sigset_t *set, sigset_t *oldset)
+ int pthread_equal(pthread_t t1, pthread_t t2)
+ int pthread_create(pthread_t *thread, pthread_attr_t *attr,
+ void *(*start_routine) (void *), void *arg)
+ int pthread_join(pthread_t thread, void **retval)
+
+ int pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *mutexattr)
+ int pthread_mutex_lock(pthread_mutex_t *mutex)
+ int pthread_mutex_unlock(pthread_mutex_t *mutex)
+
+cdef extern from "semaphore.h" nogil:
+ ctypedef struct sem_t:
+ pass
+
+ int sem_init(sem_t *sem, int pshared, unsigned int value)
+ int sem_post(sem_t *sem)
+ int sem_wait(sem_t *sem)
diff --git a/PKG-INFO b/PKG-INFO
index 5d0e27c..f2b9725 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: llfuse
-Version: 0.41.1
+Version: 0.42.1
Summary: Python bindings for the low-level FUSE API
Home-page: https://bitbucket.org/nikratio/python-llfuse/
Author: Nikolaus Rath
@@ -12,17 +12,24 @@ Description: ..
e.g. :file:`foo`) here because this isn't rendered correctly
by PyPi and/or BitBucket.
- About Python-LLFUSE
- ===================
+ The Python-LLFUSE Module
... 152053 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-llfuse.git
More information about the Python-modules-commits
mailing list