- let evs = Inotify.read fd in
- List.iter (fun x->
- match x with
- | (wd,evlist,_,Some(str)) ->
- let purestr = asciiz(str) in
- let (dirname,handler) =
- try Hashtbl.find wdmap wd with Not_found->("",Nohandler)
- in
- (
- match handler with
- | Nohandler->fprintf logfd "Unhandled watch descriptor\n";flush logfd
- | Activehandler(handler)->handler wd dirname evlist purestr
- | Maskedhandler(_)->()
- )
- | _ -> ())
- evs
+ let evs = Inotify.read fd in
+ List.iter (fun x->
+ match x with
+ | (wd,evlist,_,Some(str)) ->
+ begin
+ let purestr = asciiz(str) in
+ let (dirname,handler) =
+ try Hashtbl.find wdmap wd with Not_found->("",None)
+ in
+ match handler with
+ | None->fprintf logfd "Unhandled watch descriptor\n";flush logfd
+ | Some(handler)->handler wd dirname evlist purestr
+ end
+ | _ -> ())
+ evs