bindings-lxc 0.1 → 0.2
raw patch · 4 files changed
+28/−8 lines, 4 files
Files
- CHANGELOG.md +3/−0
- bindings-lxc.cabal +4/−1
- include/bindings.lxc.container.h +14/−0
- src/Bindings/LXC/Container.hsc +7/−7
+ CHANGELOG.md view
@@ -0,0 +1,3 @@+0.2+---+* fixed types in `Bindings.LXC.Container`
bindings-lxc.cabal view
@@ -1,8 +1,9 @@ name: bindings-lxc-version: 0.1+version: 0.2 synopsis: Direct Haskell bindings to LXC (Linux containers) C API. description: The package provides direct bindings to LXC C API through @bindings-dsl@. homepage: https://github.com/fizruk/bindings-lxc+bug-reports: https://github.com/fizruk/bindings-lxc/issues license: BSD3 license-file: LICENSE author: Nickolay Kudasov@@ -11,6 +12,8 @@ category: FFI build-type: Simple extra-source-files: README.md+ , CHANGELOG.md+ , include/bindings.lxc.container.h cabal-version: >=1.10 library
+ include/bindings.lxc.container.h view
@@ -0,0 +1,14 @@+#ifndef __BINDINGS_LXC_CONTAINER_H__+#define __BINDINGS_LXC_CONTAINER_H__++typedef struct {+ char *zfsroot; /*!< ZFS root path */+} zfs_t;++typedef struct {+ char *vg; /*!< LVM Volume Group name */+ char *lv; /*!< LVM Logical Volume name */+ char *thinpool; /*!< LVM thin pool to use, if any */+} lvm_t;++#endif /* __BINDINGS_LXC_CONTAINER_H__ */
src/Bindings/LXC/Container.hsc view
@@ -39,7 +39,7 @@ #field comment_pathname , CString #field timestamp , CString #field lxcpath , CString-#field free , FunPtr (<struct lxc_snapshot> -> IO ())+#field free , FunPtr (Ptr <struct lxc_snapshot> -> IO ()) #stoptype #starttype struct lxc_container@@ -67,14 +67,14 @@ #field rename , FunPtr (Ptr <struct lxc_container> -> CString -> IO CBool) #field reboot , FunPtr (Ptr <struct lxc_container> -> IO CBool) #field shutdown , FunPtr (Ptr <struct lxc_container> -> CInt -> IO CBool)-#field clear_config , FunPtr (Ptr <struct lxc_container> -> IO CBool)+#field clear_config , FunPtr (Ptr <struct lxc_container> -> IO ()) #field clear_config_item , FunPtr (Ptr <struct lxc_container> -> CString -> IO CBool) #field get_config_item , FunPtr (Ptr <struct lxc_container> -> CString -> CString -> CInt -> IO CInt) #field get_running_config_item , FunPtr (Ptr <struct lxc_container> -> CString -> IO CString) #field get_keys , FunPtr (Ptr <struct lxc_container> -> CString -> CString -> CInt -> IO CInt) #field get_interfaces , FunPtr (Ptr <struct lxc_container> -> IO (Ptr CString)) #field get_ips , FunPtr (Ptr <struct lxc_container> -> CString -> CString -> CInt -> IO (Ptr CString))-#field get_cgroup_item , FunPtr (Ptr <struct lxc_container> -> CString -> Ptr CChar -> CInt -> IO CInt)+#field get_cgroup_item , FunPtr (Ptr <struct lxc_container> -> CString -> CString -> CInt -> IO CInt) #field set_cgroup_item , FunPtr (Ptr <struct lxc_container> -> CString -> CString -> IO CBool) #field get_config_path , FunPtr (Ptr <struct lxc_container> -> IO CString) #field set_config_path , FunPtr (Ptr <struct lxc_container> -> CString -> IO CBool)@@ -82,7 +82,7 @@ #field console_getfd , FunPtr (Ptr <struct lxc_container> -> Ptr CInt -> Ptr CInt -> IO CInt) #field console , FunPtr (Ptr <struct lxc_container> -> CInt -> CInt -> CInt -> CInt -> CInt -> IO CInt) #field attach , FunPtr (Ptr <struct lxc_container> -> C_lxc_attach_exec_t -> Ptr () -> Ptr <struct lxc_attach_options_t> -> Ptr <pid_t> -> IO CInt)-#field attach_run_wait , FunPtr (Ptr <struct lxc_container> -> C_lxc_attach_exec_t -> CString -> Ptr CString -> IO CInt)+#field attach_run_wait , FunPtr (Ptr <struct lxc_container> -> Ptr <struct lxc_attach_options_t> -> CString -> Ptr CString -> IO CInt) #field snapshot , FunPtr (Ptr <struct lxc_container> -> CString -> IO CInt) #field snapshot_list , FunPtr (Ptr <struct lxc_container> -> Ptr (Ptr <struct lxc_snapshot>) -> IO CInt) #field snapshot_restore , FunPtr (Ptr <struct lxc_container> -> CString -> CString -> IO CBool)@@ -98,7 +98,7 @@ #ccall lxc_get_wait_states , Ptr CString -> IO CInt #ccall lxc_get_global_config_item , CString -> IO CString #ccall lxc_get_version , IO CString-#ccall list_defined_containers , CString -> Ptr (Ptr CString) -> Ptr (Ptr (Ptr <struct lxc_container>))-#ccall list_active_containers , CString -> Ptr (Ptr CString) -> Ptr (Ptr (Ptr <struct lxc_container>))-#ccall list_all_containers , CString -> Ptr (Ptr CString) -> Ptr (Ptr (Ptr <struct lxc_container>))+#ccall list_defined_containers , CString -> Ptr (Ptr CString) -> Ptr (Ptr (Ptr <struct lxc_container>)) -> IO CInt+#ccall list_active_containers , CString -> Ptr (Ptr CString) -> Ptr (Ptr (Ptr <struct lxc_container>)) -> IO CInt+#ccall list_all_containers , CString -> Ptr (Ptr CString) -> Ptr (Ptr (Ptr <struct lxc_container>)) -> IO CInt #ccall lxc_log_close , IO ()