# HG changeset patch
# User Damien Riegel <[email protected]>
# Date 1462465784 14400
# Thu May 05 12:29:44 2016 -0400
# Node ID c1a4059ef454226bf2cdfdf70ba6d53791170b7e
# Parent 7172955709aa1f8ffff738276c9a8599834a76d1
pop: 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 7172955709aa -r c1a4059ef454 pop.c
--- a/pop.c Thu May 05 12:36:40 2016 -0400
+++ b/pop.c Thu May 05 12:29:44 2016 -0400
@@ -396,7 +396,13 @@
return (new_count - old_count);
}
+static int pop_probe(const char *path)
+{
+ return mx_get_magic(path) == M_POP;
+}
+
struct mx_ops mx_pop_ops = {
+ .probe = pop_probe,
.close = pop_close_mailbox,
};