patch-2.2.0-pre4 linux/fs/binfmt_misc.c
Next file: linux/fs/fat/inode.c
Previous file: linux/drivers/sound/soundcard.c
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Sat Jan 2 17:55:06 1999
- Orig file:
v2.2.0-pre3/linux/fs/binfmt_misc.c
- Orig date:
Fri Jan 1 12:58:20 1999
diff -u --recursive --new-file v2.2.0-pre3/linux/fs/binfmt_misc.c linux/fs/binfmt_misc.c
@@ -30,6 +30,16 @@
#include <asm/uaccess.h>
#include <asm/spinlock.h>
+/*
+ * We should make this work with a "stub-only" /proc,
+ * which would just not be able to be configured.
+ * Right now the /proc-fs support is too black and white,
+ * though, so just remind people that this should be
+ * fixed..
+ */
+#ifndef CONFIG_PROC_FS
+#error You really need /proc support for binfmt_misc. Please reconfigure!
+#endif
#define VERBOSE_STATUS /* undef this to save 400 bytes kernel memory */
@@ -67,9 +77,7 @@
static int free_id = 1;
static int enabled = 1;
-#ifdef CONFIG_SMP
-static rwlock_t entries_lock = RW_LOCK_UNLOCKED;
-#endif
+static rwlock_t entries_lock __attribute__((unused)) = RW_LOCK_UNLOCKED;
/*
@@ -458,8 +466,10 @@
{
if (!(e->proc_dir = create_proc_entry(e->proc_name,
S_IFREG | S_IRUGO | S_IWUSR, bm_dir)))
- return -ENOMEM;
-
+ {
+ printk(KERN_WARNING "Unable to create /proc entry.\n");
+ return -ENOENT;
+ }
e->proc_dir->data = (void *) (e->id);
e->proc_dir->read_proc = proc_read_status;
e->proc_dir->write_proc = proc_write_status;
@@ -486,7 +496,7 @@
int __init init_misc_binfmt(void)
{
- int error = -ENOMEM;
+ int error = -ENOENT;
struct proc_dir_entry *status = NULL, *reg;
bm_dir = create_proc_entry("sys/fs/binfmt_misc", S_IFDIR, NULL);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov