summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdike <jdike>2003-02-27 16:59:15 +0000
committerjdike <jdike>2003-02-27 16:59:15 +0000
commit21cd9622bf2153be64c9b5bc3db3865873792dc4 (patch)
tree7c8fe2251ece6dc89cce3e09839adf7ed826aa07
parente84aaaccb5a31829c00793be81a3b7d637b32550 (diff)
downloaduml-history-21cd9622bf2153be64c9b5bc3db3865873792dc4.tar.gz
Fixed the initialization of dev->openflags.
-rw-r--r--arch/um/drivers/ubd_kern.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 6aa336e..5cc8fca 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -698,6 +698,7 @@ static int ubd_open_dev(struct ubd *dev)
struct openflags flags;
int err, create_cow, *create_ptr;
+ dev->openflags = dev->boot_openflags;
create_cow = 0;
create_ptr = (dev->cow.file != NULL) ? &create_cow : NULL;
dev->fd = open_ubd_file(dev->file, &dev->openflags, &dev->cow.file,
@@ -766,8 +767,6 @@ static int ubd_open(struct inode *inode, struct file *filp)
goto out;
if(dev->count == 0){
- dev->openflags = dev->boot_openflags;
-
err = ubd_open_dev(dev);
if(err){
printk(KERN_ERR "ubd%d: Can't open \"%s\": "