Return 0 if:
- "-u N" specified, no -f, and mdN found,
- no -u, "-f /pathname" specified, and mdN associated with /pathname found,
- "-u N" specified, "-f /pathname" specified, and both of them found,
- "-l" specified and no -f,
- "-l" specified, "-f /pathname" specified, and /pathname found.
otherwise return -1.
Spotted by: Julian H. Stacey