Don't you need to add `p` to the `getopt_long` call? Have you checked your new switch branch is actually getting called?