From 8aadde50b362ce5e2287c0ffe98f3033229f2846 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 2 Feb 2015 15:44:40 +0100 Subject: [PATCH] generator: add VPublicNoFish visibility type Usable to have public functions, i.e. like VPublic, but do not showing them in guestfish. --- generator/actions.ml | 6 +++--- generator/c.ml | 2 +- generator/types.ml | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/generator/actions.ml b/generator/actions.ml index c0beaae57..25f4bb593 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -12744,19 +12744,19 @@ let non_daemon_functions, daemon_functions = let all_functions = non_daemon_functions @ daemon_functions let is_external { visibility = v } = match v with - | VPublic | VStateTest | VBindTest | VDebug -> true + | VPublic | VPublicNoFish | VStateTest | VBindTest | VDebug -> true | VInternal -> false let is_internal f = not (is_external f) let is_documented { visibility = v } = match v with - | VPublic | VStateTest -> true + | VPublic | VPublicNoFish | VStateTest -> true | VBindTest | VDebug | VInternal -> false let is_fish { visibility = v; style = (_, args, _) } = (* Internal functions are not exported to guestfish. *) match v with - | VStateTest | VBindTest | VInternal -> false + | VPublicNoFish | VStateTest | VBindTest | VInternal -> false | VPublic | VDebug -> (* Functions that take Pointer parameters cannot be used in * guestfish, since there is no way the user could safely diff --git a/generator/c.ml b/generator/c.ml index 1c288534e..24c16055a 100644 --- a/generator/c.ml +++ b/generator/c.ml @@ -45,7 +45,7 @@ let hash_matches h { name = name } = type optarg_proto = Dots | VA | Argv let is_public { visibility = v } = match v with - | VPublic | VStateTest | VDebug -> true + | VPublic | VPublicNoFish | VStateTest | VDebug -> true | VBindTest | VInternal -> false let is_private f = not (is_public f) diff --git a/generator/types.ml b/generator/types.ml index 2be6bae5f..ad9fa6349 100644 --- a/generator/types.ml +++ b/generator/types.ml @@ -322,6 +322,8 @@ and cmd = string list type visibility = | VPublic (* Part of the public API *) + | VPublicNoFish (* Like VPublic, but not exported in + guestfish *) | VStateTest (* A function which tests the state of the appliance *) | VBindTest (* Only used for testing language bindings *)