Permalink
Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (22 sloc) 955 Bytes
(*
* Copyright (C) Citrix Systems Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; version 2.1 only. with the special
* exception on linking described in file LICENSE.
*
* 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 Lesser General Public License for more details.
*)
let losetup = ref "/sbin/losetup"
open Unix
let essentials = [
X_OK, "losetup", losetup, "path to the losetup binary";
]
let nonessentials = [
]
let canonicalise x = Filename.(if is_relative x then concat (Unix.getcwd ()) x else x)
let config_spec = List.map (fun (_, a, b, c) -> a, Arg.String (fun x -> b := canonicalise x), (fun () -> !b), c) (essentials @ nonessentials)