open device for read/write, so we can actually load

devices w/new checks in kern_lkm.c
This commit is contained in:
cgd 1993-06-07 23:10:34 +00:00
parent 77e24b59b2
commit 950f32bf2a
2 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: modload.c,v 1.1 1993/06/07 19:52:11 cgd Exp $
* $Id: modload.c,v 1.2 1993/06/07 23:10:34 cgd Exp $
*/
#define printf I_HATE_ANSI
@ -212,7 +212,7 @@ char *av[];
* to write the new module to it as our means of getting it in the
* kernel).
*/
if( ( devfd = open( LKM_DEV, O_RDONLY, 0)) == -1) {
if( ( devfd = open( LKM_DEV, O_RDWR, 0)) == -1) {
perror( LKM_DEV);
err = 3;
goto done;

View File

@ -43,7 +43,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: modunload.c,v 1.1 1993/06/07 19:52:16 cgd Exp $
* $Id: modunload.c,v 1.2 1993/06/07 23:10:37 cgd Exp $
*/
#define printf I_HATE_ANSI
@ -115,7 +115,7 @@ char *av[];
* Open the virtual device device driver for exclusive use (needed
* to ioctl() to retrive the loaded module(s) status).
*/
if( ( devfd = open( LKM_DEV, O_RDONLY, 0)) == -1) {
if( ( devfd = open( LKM_DEV, O_RDWR, 0)) == -1) {
perror( LKM_DEV);
exit( 2);
}