Skip to content

Commit d5b3934

Browse files
committed
Run ocp-indent -i on all the source code
1 parent 1e6cf62 commit d5b3934

13 files changed

Lines changed: 1522 additions & 1522 deletions

File tree

src/hostnet/arp.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ module Make (Ethif: Mirage_protocols_lwt.ETHIF) = struct
143143
f "error while reading ARP packet: %a" Ethif.pp_error e);
144144
end else Lwt.return_unit
145145
|2 -> (* Reply *)
146-
(* the requested address *)
146+
(* the requested address *)
147147
let spa = Ipaddr.V4.of_int32 (get_arp_tpa frame) in
148148
Log.debug (fun f -> f "ARP ignoring reply %s" (Ipaddr.V4.to_string spa));
149149
Lwt.return_unit
@@ -156,8 +156,8 @@ module Make (Ethif: Mirage_protocols_lwt.ETHIF) = struct
156156
let connect ~table ethif =
157157
let table =
158158
List.fold_left (fun acc (ip, mac) ->
159-
Table.add ip mac acc
160-
) Table.empty table
159+
Table.add ip mac acc
160+
) Table.empty table
161161
in
162162
{ table; ethif }
163163

src/hostnet/host.ml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -409,30 +409,30 @@ module Sockets = struct
409409
let connect ?(read_buffer_size = default_read_buffer_size) (ip, port) =
410410
let description = Fmt.strf "tcp:%a:%d" Ipaddr.pp_hum ip port in
411411
let label = match ip with
412-
| Ipaddr.V4 _ -> "TCPv4"
413-
| Ipaddr.V6 _ -> "TCPv6" in
412+
| Ipaddr.V4 _ -> "TCPv4"
413+
| Ipaddr.V6 _ -> "TCPv6" in
414414
register_connection_noexn description
415415
>>= function
416416
| None ->
417417
errorf "Socket.%s.connect %s: hit connection limit" label description
418418
| Some idx ->
419-
let fd =
420-
try match ip with
421-
| Ipaddr.V4 _ -> Uwt.Tcp.init_ipv4_exn ()
422-
| Ipaddr.V6 _ -> Uwt.Tcp.init_ipv6_exn ()
423-
with e -> deregister_connection idx; raise e in
424-
Lwt.catch (fun () ->
425-
let sockaddr = make_sockaddr (ip, port) in
426-
Uwt.Tcp.connect fd ~addr:sockaddr >>= fun () ->
427-
of_fd ~idx ~label ~read_buffer_size ~description fd
428-
|> Lwt_result.return
429-
) (fun e ->
430-
deregister_connection idx;
431-
log_exception_continue "Tcp.connect Uwt.Tcp.close_wait"
432-
(fun () -> Uwt.Tcp.close_wait fd)
433-
>>= fun () ->
434-
errorf "Socket.%s.connect %s: caught %a" label description Fmt.exn e
435-
)
419+
let fd =
420+
try match ip with
421+
| Ipaddr.V4 _ -> Uwt.Tcp.init_ipv4_exn ()
422+
| Ipaddr.V6 _ -> Uwt.Tcp.init_ipv6_exn ()
423+
with e -> deregister_connection idx; raise e in
424+
Lwt.catch (fun () ->
425+
let sockaddr = make_sockaddr (ip, port) in
426+
Uwt.Tcp.connect fd ~addr:sockaddr >>= fun () ->
427+
of_fd ~idx ~label ~read_buffer_size ~description fd
428+
|> Lwt_result.return
429+
) (fun e ->
430+
deregister_connection idx;
431+
log_exception_continue "Tcp.connect Uwt.Tcp.close_wait"
432+
(fun () -> Uwt.Tcp.close_wait fd)
433+
>>= fun () ->
434+
errorf "Socket.%s.connect %s: caught %a" label description Fmt.exn e
435+
)
436436

437437
let shutdown_read _ =
438438
Lwt.return ()

src/hostnet/mux.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ module Make (Netif: Mirage_net_lwt.S) = struct
9393
let t = { netif; rules; default_callback } in
9494
Lwt.async
9595
(fun () ->
96-
Netif.listen netif @@ callback t >>= function
97-
| Ok () -> Lwt.return_unit
98-
| Error _e ->
99-
Log.err (fun f -> f "Mux.connect calling Netif.listen: failed");
100-
Lwt.return_unit
96+
Netif.listen netif @@ callback t >>= function
97+
| Ok () -> Lwt.return_unit
98+
| Error _e ->
99+
Log.err (fun f -> f "Mux.connect calling Netif.listen: failed");
100+
Lwt.return_unit
101101
);
102102
Lwt.return (Ok t)
103103

src/hostnet/sig.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module type READ_INTO = sig
44

55
val read_into: flow -> Cstruct.t ->
66
(unit Mirage_flow.or_eof, error) result Lwt.t
7-
(** Completely fills the given buffer with data from [fd] *)
7+
(** Completely fills the given buffer with data from [fd] *)
88
end
99

1010
module type FLOW_CLIENT = sig
@@ -14,8 +14,8 @@ module type FLOW_CLIENT = sig
1414

1515
val connect: ?read_buffer_size:int -> address ->
1616
(flow, [`Msg of string]) result Lwt.t
17-
(** [connect address] creates a connection to [address] and returns
18-
he connected flow. *)
17+
(** [connect address] creates a connection to [address] and returns
18+
he connected flow. *)
1919
end
2020

2121
module type CONN = sig

src/hostnet/slirp.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ module Make
102102
struct
103103
(* module Tcpip_stack = Tcpip_stack.Make(Vmnet)(Host.Time) *)
104104

105-
module Filteredif = Filter.Make(Vmnet)
105+
module Filteredif = Filter.Make(Vmnet)
106106
module Netif = Capture.Make(Filteredif)
107107
module Recorder = (Netif: Sig.RECORDER with type t = Netif.t)
108108
module Switch = Mux.Make(Netif)

src/hostnet/vmnet.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ module Make(C: Sig.CONN) = struct
331331
server_negotiate ~fd:channel ~client_macaddr_of_uuid ~mtu
332332
>>= fun (client_uuid, client_macaddr) ->
333333
let t = make ~client_macaddr ~server_macaddr ~mtu ~client_uuid
334-
~log_prefix:server_log_prefix channel in
334+
~log_prefix:server_log_prefix channel in
335335
Lwt_result.return t
336336

337337
let client_of_fd ~uuid ~server_macaddr flow =

0 commit comments

Comments
 (0)