From 5d7927e392e70436aaca1f8261e5d4ab8e4ec8f8 Mon Sep 17 00:00:00 2001
From: John Estabrook <jestabro@vyos.io>
Date: Wed, 23 Oct 2024 18:50:46 -0500
Subject: T6718: update build system, drop batteries, and adjust for lib
 changes

Update as needed for use with contemporary vyos1x-config:
. update build system to use dune
. drop use of batteries
. update for protoc breaking changes in versions >= 3.0
. remove files now in vyos1x-config (config_tree et. al.; parsing)
---
 src/vycli.ml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/vycli.ml')

diff --git a/src/vycli.ml b/src/vycli.ml
index e00a4e3..6c1ed0c 100644
--- a/src/vycli.ml
+++ b/src/vycli.ml
@@ -60,7 +60,7 @@ let main socket op path out_format config_format =
                 begin
                     match resp.status with
                     | Success -> Ok "" |> Lwt.return
-                    | _ -> Error (BatOption.default "" resp.error) |> Lwt.return
+                    | _ -> Error (Option.value resp.error ~default:"") |> Lwt.return
                 end
             | OpSetupSession ->
                 let%lwt resp = setup_session client "vycli" in
@@ -81,7 +81,7 @@ let main socket op path out_format config_format =
     | Error e -> let%lwt () = Lwt_io.write Lwt_io.stderr (Printf.sprintf "%s\n" e) in Lwt.return 1
 
 let _ =
-    let () = Arg.parse args (fun f -> ()) usage in
+    let () = Arg.parse args (fun _ -> ()) usage in
     let path = String.trim !path_opt |> Pcre.split ~pat:"\\s+" in
     let out_format = output_format_of_string !out_format_opt in
     let config_format = config_format_of_string !conf_format_opt in
-- 
cgit v1.2.3