Giter Club home page Giter Club logo

libzfs-python's People

Contributors

doctaweeks avatar kelleyk avatar xaroth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libzfs-python's Issues

Package for PyPI

I'd love to have releases tagged and packaged for PyPI for easy install via pip on administrated systems. This would greatly simplify the current deployment from source only model.

ffi.new_handle(None)

I see the following code

config = libzfs.zpool_get_config(self.hdl, ffi.new_handle(None))

here https://github.com/Xaroth/libzfs-python/blob/master/libzfs/zpool.py#L133

As far as I can see from the CFFI documentation ffi.new_handle(None) produces a cdata object representing a void* pointer and that pointer is associated with None. Not sure if that makes sense at all to associate with None. But what worries me more is that the produced void* pointer is passed as the second argument to zpool_get_config() which actually interprets it as a pointer to a pointer, nvlist_t** and assigns a value to that pointer. I am not sure if it is safe to do that via a pointer returned from ffi.new_handle(). My impression is that such a pointer is never meant to be dereferenced. I think that it can only passed between python and C code and used with ffi.from_handle().

Perhaps ffi.NULL would be better to use here?

Bindings fail to build against zfsonlinux 0.6.5.3-1

I'm using the latest version of zfsonlinux from the official PPA on an Ubuntu 15.10 system. Unfortunately, it seems as though there is a problem with the way that the bindings manager generates header.h from libzfs.h; cffi blows up when trying to process this line (which is obviously malformed):

typedef struct zfs_perm_node { avl_node_t z_node; char z_pname[ typedef struct zfs_allow_node { avl_node_t z_node; char z_key[ typedef struct zfs_allow { struct zfs_allow *z_next; char z_setpoint[ typedef struct zfs_handle zfs_handle_t;

(Perhaps it's having trouble with the brackets in the definitions of e.g. z_pname?)

At some point in May, I had been using the then-current versions of zfsonlinux and libzfs-python with Ubuntu 15.04 without any trouble. I've tried older and newer versions of libzfs-python, cffi, etc. (everything except libzfs-dev) without any change.

NVList.update() method

It seems that NVList.update() method is unusable now, because internally it calls NVList.add() with 2 parameters, but actual NVList.add() requires 3 parameters. It is not clear whether it would be possible to infer proper data types from python types at all.
So, is this unfinished work-in-progress code or is this dead code? Or am I missing something?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.