90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello * This file and its contents are supplied under the terms of the
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello * Common Development and Distribution License ("CDDL"), version 1.0.
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello * You may only use this file in accordance with the terms of version
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello * 1.0 of the CDDL.
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello * A full copy of the text of the CDDL should have accompanied this
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello * source. A copy of the CDDL is also available via the Internet at
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello * Copyright 2016 Joyent, Inc.
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello * Utility functions for use in both acquire-lock and runtests.
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return (ret == 0);
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello } else if (strcmp(stylestr, "flock") == 0) {
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("posix");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("ofd");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("flock");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("<unreachable>");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("fcntl(2) POSIX");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("fcntl(2) OFD");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("flock(3C)");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("<unreachable>");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("F_SETLK");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("F_OFD_SETLK");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("F_SETLKW");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("F_OFD_SETLKW");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("F_GETLK");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("F_OFD_GETLK");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("F_FLOCK");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("F_FLOCKW");
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello return ("<unreachable>");