mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
The new module ‘Std_utils’ contains only functions which are pure OCaml and depend only on the OCaml stdlib. Therefore these functions may be used by the generator. The new module is moved to ‘common/mlstdutils’. This also removes the "<stdlib>" hack, and the code which copied the library around. Also ‘Guestfs_config’, ‘Libdir’ and ‘StringMap’ modules are moved since these are essentially the same. The bulk of this change is just updating files which use ‘open Common_utils’ to add ‘open Std_utils’ where necessary.
50 lines
1.8 KiB
OCaml
50 lines
1.8 KiB
OCaml
(* libguestfs
|
|
* Copyright (C) 2011 Red Hat Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*)
|
|
|
|
(* Please read generator/README first. *)
|
|
|
|
open Std_utils
|
|
open Utils
|
|
|
|
(* NB: DO NOT REORDER THESE, as doing so will change the ABI. Only
|
|
* add new event types at the end of the list.
|
|
*)
|
|
let events = [
|
|
"close"; (* close handle *)
|
|
"subprocess_quit"; (* subprocess quit *)
|
|
"launch_done"; (* launched *)
|
|
|
|
"progress"; (* progress message *)
|
|
|
|
(* log messages from various sources *)
|
|
"appliance"; (* log messages from
|
|
qemu / kernel / guestfsd / tools *)
|
|
"library"; (* log messages from library *)
|
|
"trace"; (* call trace messages *)
|
|
|
|
"enter"; (* enter a function *)
|
|
|
|
"libvirt_auth"; (* libvirt authentication request *)
|
|
|
|
"warning"; (* warnings from the library *)
|
|
]
|
|
|
|
let events = mapi (fun i name -> name, 1 lsl i) events
|
|
|
|
let all_events_bitmask = (1 lsl List.length events) - 1
|