When opening an array to manipulate it we never need to write to the
array and sometimes it might be read-only so the open for write will
fail.
So always open read-only.
Reported-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
char buf[20];
sprintf(buf, "%d:%d", dev2major(devnum), dev2minor(devnum));
char buf[20];
sprintf(buf, "%d:%d", dev2major(devnum), dev2minor(devnum));
- return dev_open(buf, O_RDWR);
+ return dev_open(buf, O_RDONLY);
}
int open_dev_excl(int devnum)
}
int open_dev_excl(int devnum)