Deleted Added
full compact
mps_cmd.c (286180) mps_cmd.c (289364)
1/*-
2 * Copyright (c) 2008 Yahoo!, Inc.
3 * All rights reserved.
4 * Written by: John Baldwin <jhb@FreeBSD.org>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 15 unchanged lines hidden (view full) ---

24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008 Yahoo!, Inc.
3 * All rights reserved.
4 * Written by: John Baldwin <jhb@FreeBSD.org>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 15 unchanged lines hidden (view full) ---

24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 */
30
31#include <sys/cdefs.h>
32__RCSID("$FreeBSD: projects/mpsutil/usr.sbin/mpsutil/mps_cmd.c 286180 2015-08-02 03:52:51Z scottl $");
32__RCSID("$FreeBSD: projects/mpsutil/usr.sbin/mpsutil/mps_cmd.c 289364 2015-10-15 15:19:38Z bapt $");
33
34#include <sys/param.h>
35#include <sys/errno.h>
36#include <sys/ioctl.h>
37#if 0
38#include <sys/mps_ioctl.h>
39#else
40#include "mps_ioctl.h"

--- 575 unchanged lines hidden (view full) ---

616}
617#endif
618
619int
620mps_open(int unit)
621{
622 char path[MAXPATHLEN];
623
33
34#include <sys/param.h>
35#include <sys/errno.h>
36#include <sys/ioctl.h>
37#if 0
38#include <sys/mps_ioctl.h>
39#else
40#include "mps_ioctl.h"

--- 575 unchanged lines hidden (view full) ---

616}
617#endif
618
619int
620mps_open(int unit)
621{
622 char path[MAXPATHLEN];
623
624 snprintf(path, sizeof(path), "/dev/mps%d", unit);
624 snprintf(path, sizeof(path), "/dev/mp%s%d", is_mps ? "s": "r", unit);
625 return (open(path, O_RDWR));
626}
627
628int
629mps_user_command(int fd, void *req, uint32_t req_len, void *reply,
630 uint32_t reply_len, void *buffer, int len, uint32_t flags)
631{
632 struct mps_usr_command cmd;

--- 81 unchanged lines hidden ---
625 return (open(path, O_RDWR));
626}
627
628int
629mps_user_command(int fd, void *req, uint32_t req_len, void *reply,
630 uint32_t reply_len, void *buffer, int len, uint32_t flags)
631{
632 struct mps_usr_command cmd;

--- 81 unchanged lines hidden ---