]> git.hungrycats.org Git - linux/commitdiff
[PATCH] more raw driver minor numbers
authorAndrew Morton <akpm@osdl.org>
Sat, 4 Oct 2003 05:00:24 +0000 (22:00 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Sat, 4 Oct 2003 05:00:24 +0000 (22:00 -0700)
From: Badari Pulavarty <pbadari@us.ibm.com>

Since we have larger dev_t now, here is the patch to support large
number of RAW devices.  The userlevel command "raw" also needs changes to
use this support - which in turn needs new glibc.

drivers/char/Kconfig
drivers/char/raw.c
include/linux/raw.h

index 3074496ac6f5f4feec7e8705b07a930bb441b7f8..654a1be4c429442d7c16f463cf4e93d8693112ec 100644 (file)
@@ -954,6 +954,15 @@ config RAW_DRIVER
          Once bound, I/O against /dev/raw/rawN uses efficient zero-copy I/O. 
          See the raw(8) manpage for more details.
 
+config MAX_RAW_DEVS
+       int "Maximum number of RAW devices to support (1-8192)"
+       depends on RAW_DRIVER
+       default "256"
+       help
+         The maximum number of RAW devices that are supported.
+         Default is 256. Increase this number in case you need lots of
+         raw devices.
+
 config HANGCHECK_TIMER
        tristate "Hangcheck timer"
        depends on X86_64 || X86
index e089996c9877cf9eb692edd388f9eaef46ded4d1..3673dcb7ee85b23dae85011162a89e176a26ffb6 100644 (file)
@@ -20,8 +20,6 @@
 
 #include <asm/uaccess.h>
 
-#define MAX_RAW_MINORS 256
-
 struct raw_device_data {
        struct block_device *binding;
        int inuse;
index 4736390a5db5dc35048886d42f1cb75fda3cf4d0..62d543e70603e2837755475babf07b8598fc841f 100644 (file)
@@ -13,4 +13,6 @@ struct raw_config_request
        __u64   block_minor;
 };
 
+#define MAX_RAW_MINORS CONFIG_MAX_RAW_DEVS
+
 #endif /* __LINUX_RAW_H */