summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mfiutil/mfi_patrol.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/mfiutil/mfi_patrol.c')
-rw-r--r--usr.sbin/mfiutil/mfi_patrol.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/mfiutil/mfi_patrol.c b/usr.sbin/mfiutil/mfi_patrol.c
index dd348ad..74cd128 100644
--- a/usr.sbin/mfiutil/mfi_patrol.c
+++ b/usr.sbin/mfiutil/mfi_patrol.c
@@ -32,6 +32,7 @@
#include <sys/types.h>
#include <sys/errno.h>
#include <err.h>
+#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -86,7 +87,7 @@ show_patrol(int ac, char **av)
int error, fd;
u_int i;
- fd = mfi_open(mfi_unit);
+ fd = mfi_open(mfi_unit, O_RDWR);
if (fd < 0) {
error = errno;
warn("mfi_open");
@@ -196,7 +197,7 @@ start_patrol(int ac, char **av)
{
int error, fd;
- fd = mfi_open(mfi_unit);
+ fd = mfi_open(mfi_unit, O_RDWR);
if (fd < 0) {
error = errno;
warn("mfi_open");
@@ -222,7 +223,7 @@ stop_patrol(int ac, char **av)
{
int error, fd;
- fd = mfi_open(mfi_unit);
+ fd = mfi_open(mfi_unit, O_RDWR);
if (fd < 0) {
error = errno;
warn("mfi_open");
@@ -292,7 +293,7 @@ patrol_config(int ac, char **av)
return (EINVAL);
}
- fd = mfi_open(mfi_unit);
+ fd = mfi_open(mfi_unit, O_RDWR);
if (fd < 0) {
error = errno;
warn("mfi_open");
OpenPOWER on IntegriCloud