daemon: directly use Optgroups

Avoid extra module variables, and just use Optgroups directly.
This commit is contained in:
Pino Toscano
2018-04-09 12:52:55 +02:00
parent e4056aa57a
commit a43bdb9379
5 changed files with 2 additions and 10 deletions

View File

@@ -20,8 +20,6 @@ open Std_utils
open Utils
let available = Optgroups.ldm_available
(* All device mapper devices are called /dev/mapper/ldm_vol_*
* or /dev/mapper/ldm_part_*.
*

View File

@@ -16,7 +16,5 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*)
val available : unit -> bool
val list_ldm_volumes : unit -> string list
val list_ldm_partitions : unit -> string list

View File

@@ -21,8 +21,8 @@ open Printf
open Std_utils
let rec list_filesystems () =
let has_lvm2 = Lvm.available () in
let has_ldm = Ldm.available () in
let has_lvm2 = Optgroups.lvm2_available () in
let has_ldm = Optgroups.ldm_available () in
let devices = Devsparts.list_devices () in
let partitions = Devsparts.list_partitions () in

View File

@@ -23,8 +23,6 @@ open Std_utils
open Utils
let available = Optgroups.lvm2_available
(* Check whether lvs has -S to filter its output.
* It is available only in lvm2 >= 2.02.107.
*)

View File

@@ -16,8 +16,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*)
val available : unit -> bool
val lvs : unit -> string list
val lv_canonical : string -> string option