summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdike <jdike>2003-01-18 16:25:41 +0000
committerjdike <jdike>2003-01-18 16:25:41 +0000
commit44d6427d5e62381d9ef4325f95edba32c04686da (patch)
treee39dd0c7c60c0f12f1c6686fa81c2e2e9d398ee0
parentbbcd7bc55bdfcf4f4c346501f48a43e9a751d96e (diff)
downloaduml-history-44d6427d5e62381d9ef4325f95edba32c04686da.tar.gz
The disk file descriptors are FD_CLOEXEC.
Fixed a missing return value.
-rw-r--r--arch/um/drivers/ubd_kern.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 2e86990..382c062 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -103,9 +103,11 @@ static struct gendisk fake_gendisk = INIT_GENDISK(0, "ubd", ubd_part,
&ubd_blops);
#ifdef CONFIG_BLK_DEV_UBD_SYNC
-#define OPEN_FLAGS ((struct openflags) { .r = 1, .w = 1, .s = 1, .c = 0 })
+#define OPEN_FLAGS ((struct openflags) { .r = 1, .w = 1, .s = 1, .c = 0, \
+ .cl = 1 })
#else
-#define OPEN_FLAGS ((struct openflags) { .r = 1, .w = 1, .s = 0, .c = 0 })
+#define OPEN_FLAGS ((struct openflags) { .r = 1, .w = 1, .s = 0, .c = 0, \
+ .cl = 1 })
#endif
/* Not protected - changed only in ubd_setup_common and then only to
@@ -211,6 +213,8 @@ static void make_ide_entries(char *dev_name)
spin_unlock(&ubd_lock);
dir = proc_mkdir(dev_name, proc_ide);
+ if(!dir) return;
+
ent = create_proc_entry("media", S_IFREG|S_IRUGO, dir);
if(!ent) return;
ent->nlink = 1;