# HG changeset patch
# User Damien Riegel <[email protected]>
# Date 1462465952 14400
#      Thu May 05 12:32:32 2016 -0400
# Node ID 4ea9f535827ced38dcfc62e6b9fbaceba063a4a4
# Parent  385adc8ca7bb4355f05a4553ea5435273a496ff9
mh: populate probe callback

For now, we rely on mx_get_magic to not make the implementation too
cumbersome. The point is to get rid of this "magic" anyway.

diff -r 385adc8ca7bb -r 4ea9f535827c mh.c
--- a/mh.c      Thu May 05 12:31:51 2016 -0400
+++ b/mh.c      Thu May 05 12:32:32 2016 -0400
@@ -1161,7 +1161,13 @@
   return 0;
 }
 
+static int mh_probe(const char *path)
+{
+  return mx_get_magic(path) == M_MH;
+}
+
 struct mx_ops mx_mh_ops = {
+  .probe = mh_probe,
   .close = mh_close_mailbox,
 };
 

Reply via email to