diff options
Diffstat (limited to 'usr/src/cmd/nvmeadm/nvmeadm_dev.c')
-rw-r--r-- | usr/src/cmd/nvmeadm/nvmeadm_dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/src/cmd/nvmeadm/nvmeadm_dev.c b/usr/src/cmd/nvmeadm/nvmeadm_dev.c index 6c837d0d8c..ce86a8d164 100644 --- a/usr/src/cmd/nvmeadm/nvmeadm_dev.c +++ b/usr/src/cmd/nvmeadm/nvmeadm_dev.c @@ -241,7 +241,7 @@ nvme_is_ignored_ns(int fd) } int -nvme_open(di_minor_t minor) +nvme_open(di_minor_t minor, boolean_t excl) { char *devpath, *path; int fd; @@ -256,7 +256,7 @@ nvme_open(di_minor_t minor) di_devfs_path_free(devpath); - fd = open(path, O_RDWR); + fd = open(path, O_RDWR | (excl ? O_EXCL: 0)); if (fd < 0) { if (debug) |