From: Anil Madhavapeddy Date: Thu, 5 Nov 2009 02:44:57 +0000 (+0000) Subject: Remove the statfs(3) stubs as they are not used in XAPI any more, and it assists... X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fa267177e94b5a7200b617c60f3c0bae8fafadff;p=xcp%2Fxen-api-libs.git Remove the statfs(3) stubs as they are not used in XAPI any more, and it assists with non-Linux portability. Signed-off-by: Anil Madhavapeddy --- diff --git a/stdext/unixext.ml b/stdext/unixext.ml index 23f3f72..ae0df74 100644 --- a/stdext/unixext.ml +++ b/stdext/unixext.ml @@ -533,19 +533,6 @@ let current_cursor_pos fd = (* 'seek' to the current position, exploiting the return value from Unix.lseek as the new cursor position *) Unix.lseek fd 0 Unix.SEEK_CUR -type statfs_t = { - statfs_type: int64; - statfs_bsize: int; - statfs_blocks: int64; - statfs_bfree: int64; - statfs_bavail: int64; - statfs_files: int64; - statfs_ffree: int64; - statfs_namelen: int; -} - -external statfs: string -> statfs_t = "stub_unixext_statfs" - module Fdset = struct type t external of_list : Unix.file_descr list -> t = "stub_fdset_of_list" diff --git a/stdext/unixext.mli b/stdext/unixext.mli index 5dec075..d35d51b 100644 --- a/stdext/unixext.mli +++ b/stdext/unixext.mli @@ -82,19 +82,6 @@ val seek_to : Unix.file_descr -> int -> int val seek_rel : Unix.file_descr -> int -> int val current_cursor_pos : Unix.file_descr -> int -type statfs_t = { - statfs_type: int64; - statfs_bsize: int; - statfs_blocks: int64; - statfs_bfree: int64; - statfs_bavail: int64; - statfs_files: int64; - statfs_ffree: int64; - statfs_namelen: int; -} - -val statfs: string -> statfs_t - module Fdset : sig type t external of_list : Unix.file_descr list -> t = "stub_fdset_of_list" diff --git a/stdext/unixext_stubs.c b/stdext/unixext_stubs.c index cd09d05..cd8733f 100644 --- a/stdext/unixext_stubs.c +++ b/stdext/unixext_stubs.c @@ -67,30 +67,6 @@ CAMLprim value stub_unixext_get_max_fd (value unit) CAMLreturn(Val_int(maxfd)); } -#include - -CAMLprim value stub_unixext_statfs(value path) -{ - CAMLparam1(path); - CAMLlocal1(statinfo); - struct statfs info; - - if (statfs(String_val(path), &info)) - failwith_errno(); - - statinfo = caml_alloc_tuple(8); - Store_field(statinfo, 0, caml_copy_int64(info.f_type)); - Store_field(statinfo, 1, Val_int(info.f_bsize)); - Store_field(statinfo, 2, caml_copy_int64(info.f_blocks)); - Store_field(statinfo, 3, caml_copy_int64(info.f_bfree)); - Store_field(statinfo, 4, caml_copy_int64(info.f_bavail)); - Store_field(statinfo, 5, caml_copy_int64(info.f_files)); - Store_field(statinfo, 6, caml_copy_int64(info.f_ffree)); - Store_field(statinfo, 7, Val_int(info.f_namelen)); - - CAMLreturn(statinfo); -} - #define FDSET_OF_VALUE(v) (&(((struct fdset_t *) v)->fds)) #define MAXFD_OF_VALUE(v) (((struct fdset_t *) v)->max) struct fdset_t { fd_set fds; int max; };