# HG changeset patch
# User Damien Riegel <[email protected]>
# Date 1462465800 14400
# Thu May 05 12:30:00 2016 -0400
# Node ID b5372bf0c6f4fb1e3d8eb9c4ec3ff70dc8a59896
# Parent 2a589a2f269240ff4ed7f769f3a5b6053eaf3ef7
imap: 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 2a589a2f2692 -r b5372bf0c6f4 imap/imap.c
--- a/imap/imap.c Thu May 05 12:19:57 2016 -0400
+++ b/imap/imap.c Thu May 05 12:30:00 2016 -0400
@@ -554,7 +554,13 @@
return s;
}
+static int imap_probe(const char *path)
+{
+ return mx_get_magic(path) == M_IMAP;
+}
+
struct mx_ops mx_imap_ops = {
+ .probe = imap_probe,
.close = imap_close_mailbox,
};