* [PATCH] aoe: add documentation for udev users
@ 2005-01-19 21:10 Ed L Cashin
2005-02-01 7:53 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Ed L Cashin @ 2005-01-19 21:10 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg K-H
[-- Attachment #1: Type: text/plain, Size: 211 bytes --]
Hi. This patch was generated against block-2.6 but should apply
easily in other trees, since it touches only documentation.
add documentation for udev users
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
[-- Attachment #2: patch-aoe-udev --]
[-- Type: text/plain, Size: 2881 bytes --]
--- block-2.6-export-b/Documentation/aoe/aoe.txt 2005-01-19 14:29:15.000000000 -0500
+++ linux/Documentation/aoe/aoe.txt 2005-01-19 15:57:37.000000000 -0500
@@ -6,9 +6,16 @@ The EtherDrive (R) HOWTO for users of 2.
CREATING DEVICE NODES
- Users of udev should find device nodes created automatically. Two
- scripts are provided in Documentation/aoe as examples of static
- device node creation for using the aoe driver.
+ Users of udev should find the block device nodes created
+ automatically, but to create all the necessary device nodes, use the
+ udev configuration rules provided in udev.txt (in this directory).
+
+ There is a udev-install.sh script that shows how to install these
+ rules on your system.
+
+ If you are not using udev, two scripts are provided in
+ Documentation/aoe as examples of static device node creation for
+ using the aoe driver.
rm -rf /dev/etherd
sh Documentation/aoe/mkdevs.sh /dev/etherd
--- block-2.6-export-b/Documentation/aoe/udev-install.sh 1969-12-31 19:00:00.000000000 -0500
+++ linux/Documentation/aoe/udev-install.sh 2005-01-19 15:57:37.000000000 -0500
@@ -0,0 +1,22 @@
+# install the aoe-specific udev rules from udev.txt into
+# the system's udev configuration
+#
+
+me="`basename $0`"
+
+# find udev.conf, often /etc/udev/udev.conf
+# (or environment can specify where to find udev.conf)
+#
+if test -z "$conf"; then
+ conf="`find /etc -type f -name udev.conf 2> /dev/null`"
+fi
+if test -z "$conf" || test ! -r $conf; then
+ echo "$me Error: could not find readable udev.conf in /etc" 1>&2
+ exit 1
+fi
+
+# find the directory where udev rules are stored, often
+# /etc/udev/rules.d
+#
+rules_d="`sed -n '/^udev_rules=/{ s!udev_rules=!!; s!\"!!g; p; }' $conf`"
+test "$rules_d" && sh -xc "cp `dirname $0`/udev.txt $rules_d/60-aoe.rules"
--- block-2.6-export-b/Documentation/aoe/udev.txt 1969-12-31 19:00:00.000000000 -0500
+++ linux/Documentation/aoe/udev.txt 2005-01-19 15:57:37.000000000 -0500
@@ -0,0 +1,23 @@
+# These rules tell udev what device nodes to create for aoe support.
+# They may be installed along the following lines (adjusted to what
+# you see on your system).
+#
+# ecashin@makki ~$ su
+# Password:
+# bash# find /etc -type f -name udev.conf
+# /etc/udev/udev.conf
+# bash# grep udev_rules= /etc/udev/udev.conf
+# udev_rules="/etc/udev/rules.d/"
+# bash# ls /etc/udev/rules.d/
+# 10-wacom.rules 50-udev.rules
+# bash# cp /path/to/linux-2.6.xx/Documentation/aoe/udev.txt \
+# /etc/udev/rules.d/60-aoe.rules
+#
+
+# aoe char devices
+SUBSYSTEM="aoe", KERNEL="discover", NAME="etherd/%k", GROUP="disk", MODE="0220"
+SUBSYSTEM="aoe", KERNEL="err", NAME="etherd/%k", GROUP="disk", MODE="0440"
+SUBSYSTEM="aoe", KERNEL="interfaces", NAME="etherd/%k", GROUP="disk", MODE="0220"
+
+# aoe block devices
+KERNEL="etherd*", NAME="%k", GROUP="disk"
[-- Attachment #3: Type: text/plain, Size: 41 bytes --]
--
Ed L Cashin <ecashin@coraid.com>
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <fa.gl94rva.1tkib28@ifi.uio.no>]
* Re: [PATCH] aoe: add documentation for udev users
[not found] <fa.gl94rva.1tkib28@ifi.uio.no>
@ 2005-01-20 3:07 ` Bodo Eggert
2005-01-20 14:19 ` Ed L Cashin
0 siblings, 1 reply; 6+ messages in thread
From: Bodo Eggert @ 2005-01-20 3:07 UTC (permalink / raw)
To: Ed L Cashin, linux-kernel, Greg K-H
Ed L Cashin <ecashin@coraid.com> wrote:
> +if test -z "$conf"; then
> + conf="`find /etc -type f -name udev.conf 2> /dev/null`"
> +fi
> +if test -z "$conf" || test ! -r $conf; then
> + echo "$me Error: could not find readable udev.conf in /etc" 1>&2
> + exit 1
> +fi
This will fail and print
---
bash: test: etc/udev.conf: binary operator expected
---
if there is more than one udev.conf.
Fix: Always put quotes around variables.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] aoe: add documentation for udev users
2005-01-20 3:07 ` Bodo Eggert
@ 2005-01-20 14:19 ` Ed L Cashin
2005-02-01 7:53 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Ed L Cashin @ 2005-01-20 14:19 UTC (permalink / raw)
To: 7eggert; +Cc: linux-kernel, Greg K-H
[-- Attachment #1: Type: text/plain, Size: 808 bytes --]
Bodo Eggert <7eggert@gmx.de> writes:
> Ed L Cashin <ecashin@coraid.com> wrote:
>
>> +if test -z "$conf"; then
>> + conf="`find /etc -type f -name udev.conf 2> /dev/null`"
>> +fi
>> +if test -z "$conf" || test ! -r $conf; then
>> + echo "$me Error: could not find readable udev.conf in /etc" 1>&2
>> + exit 1
>> +fi
>
> This will fail and print
> ---
> bash: test: etc/udev.conf: binary operator expected
> ---
> if there is more than one udev.conf.
>
> Fix: Always put quotes around variables.
Thanks. With the changes below, it still will complain if it finds
more than one udev.conf, but only if /etc/udev/udev.conf doesn't
exist.
Quote all shell variables, and use /etc/udev/udev.conf if available.
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
[-- Attachment #2: patch-eggbert --]
[-- Type: text/plain, Size: 853 bytes --]
diff -uprN a/Documentation/aoe/udev-install.sh b/Documentation/aoe/udev-install.sh
--- a/Documentation/aoe/udev-install.sh 2005-01-20 09:14:58.000000000 -0500
+++ b/Documentation/aoe/udev-install.sh 2005-01-20 09:13:38.000000000 -0500
@@ -8,11 +8,15 @@ me="`basename $0`"
# (or environment can specify where to find udev.conf)
#
if test -z "$conf"; then
- conf="`find /etc -type f -name udev.conf 2> /dev/null`"
-fi
-if test -z "$conf" || test ! -r $conf; then
- echo "$me Error: could not find readable udev.conf in /etc" 1>&2
- exit 1
+ if test -r /etc/udev/udev.conf; then
+ conf=/etc/udev/udev.conf
+ else
+ conf="`find /etc -type f -name udev.conf 2> /dev/null`"
+ if test -z "$conf" || test ! -r "$conf"; then
+ echo "$me Error: no udev.conf found" 1>&2
+ exit 1
+ fi
+ fi
fi
# find the directory where udev rules are stored, often
[-- Attachment #3: Type: text/plain, Size: 41 bytes --]
--
Ed L Cashin <ecashin@coraid.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] aoe: add documentation for udev users
2005-01-20 14:19 ` Ed L Cashin
@ 2005-02-01 7:53 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2005-02-01 7:53 UTC (permalink / raw)
To: Ed L Cashin; +Cc: 7eggert, linux-kernel
On Thu, Jan 20, 2005 at 09:19:17AM -0500, Ed L Cashin wrote:
> Bodo Eggert <7eggert@gmx.de> writes:
>
> > Ed L Cashin <ecashin@coraid.com> wrote:
> >
> >> +if?test?-z?"$conf";?then
> >> +????????conf="`find?/etc?-type?f?-name?udev.conf?2>?/dev/null`"
> >> +fi
> >> +if?test?-z?"$conf"?||?test?!?-r?$conf;?then
> >> +????????echo?"$me?Error:?could?not?find?readable?udev.conf?in?/etc"?1>&2
> >> +????????exit?1
> >> +fi
> >
> > This will fail and print
> > ---
> > bash: test: etc/udev.conf: binary operator expected
> > ---
> > if there is more than one udev.conf.
> >
> > Fix: Always put quotes around variables.
>
> Thanks. With the changes below, it still will complain if it finds
> more than one udev.conf, but only if /etc/udev/udev.conf doesn't
> exist.
>
>
> Quote all shell variables, and use /etc/udev/udev.conf if available.
>
> Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Applied, thanks.
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] AoE warning on 64-bit archs
@ 2005-03-10 0:19 Greg KH
2005-03-10 0:19 ` [PATCH] aoe: add documentation for udev users Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2005-03-10 0:19 UTC (permalink / raw)
To: linux-kernel; +Cc: alexn
ChangeSet 1.2035, 2005/03/09 10:20:37-08:00, alexn@dsv.su.se
[PATCH] AoE warning on 64-bit archs
I just accidently built AoE on x86-64 and it emits a warning
due to conversion of types of different size, trivial fix:
Signed-off-by: Alexander Nyberg <alexn@dsv.su.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/block/aoe/aoechr.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff -Nru a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c
--- a/drivers/block/aoe/aoechr.c 2005-03-09 16:16:13 -08:00
+++ b/drivers/block/aoe/aoechr.c 2005-03-09 16:16:13 -08:00
@@ -178,13 +178,13 @@
static ssize_t
aoechr_read(struct file *filp, char __user *buf, size_t cnt, loff_t *off)
{
- int n;
+ unsigned long n;
char *mp;
struct ErrMsg *em;
ssize_t len;
ulong flags;
- n = (int) filp->private_data;
+ n = (unsigned long) filp->private_data;
switch (n) {
case MINOR_ERR:
spin_lock_irqsave(&emsgs_lock, flags);
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH] aoe: add documentation for udev users
2005-03-10 0:19 [PATCH] AoE warning on 64-bit archs Greg KH
@ 2005-03-10 0:19 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2005-03-10 0:19 UTC (permalink / raw)
To: linux-kernel; +Cc: ecashin
ChangeSet 1.2036, 2005/03/09 10:20:56-08:00, ecashin@coraid.com
[PATCH] aoe: add documentation for udev users
add documentation for udev users
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/aoe/aoe.txt | 13 ++++++++++---
Documentation/aoe/udev-install.sh | 22 ++++++++++++++++++++++
Documentation/aoe/udev.txt | 23 +++++++++++++++++++++++
3 files changed, 55 insertions(+), 3 deletions(-)
diff -Nru a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt
--- a/Documentation/aoe/aoe.txt 2005-03-09 16:16:07 -08:00
+++ b/Documentation/aoe/aoe.txt 2005-03-09 16:16:07 -08:00
@@ -6,9 +6,16 @@
CREATING DEVICE NODES
- Users of udev should find device nodes created automatically. Two
- scripts are provided in Documentation/aoe as examples of static
- device node creation for using the aoe driver.
+ Users of udev should find the block device nodes created
+ automatically, but to create all the necessary device nodes, use the
+ udev configuration rules provided in udev.txt (in this directory).
+
+ There is a udev-install.sh script that shows how to install these
+ rules on your system.
+
+ If you are not using udev, two scripts are provided in
+ Documentation/aoe as examples of static device node creation for
+ using the aoe driver.
rm -rf /dev/etherd
sh Documentation/aoe/mkdevs.sh /dev/etherd
diff -Nru a/Documentation/aoe/udev-install.sh b/Documentation/aoe/udev-install.sh
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/Documentation/aoe/udev-install.sh 2005-03-09 16:16:07 -08:00
@@ -0,0 +1,22 @@
+# install the aoe-specific udev rules from udev.txt into
+# the system's udev configuration
+#
+
+me="`basename $0`"
+
+# find udev.conf, often /etc/udev/udev.conf
+# (or environment can specify where to find udev.conf)
+#
+if test -z "$conf"; then
+ conf="`find /etc -type f -name udev.conf 2> /dev/null`"
+fi
+if test -z "$conf" || test ! -r $conf; then
+ echo "$me Error: could not find readable udev.conf in /etc" 1>&2
+ exit 1
+fi
+
+# find the directory where udev rules are stored, often
+# /etc/udev/rules.d
+#
+rules_d="`sed -n '/^udev_rules=/{ s!udev_rules=!!; s!\"!!g; p; }' $conf`"
+test "$rules_d" && sh -xc "cp `dirname $0`/udev.txt $rules_d/60-aoe.rules"
diff -Nru a/Documentation/aoe/udev.txt b/Documentation/aoe/udev.txt
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/Documentation/aoe/udev.txt 2005-03-09 16:16:07 -08:00
@@ -0,0 +1,23 @@
+# These rules tell udev what device nodes to create for aoe support.
+# They may be installed along the following lines (adjusted to what
+# you see on your system).
+#
+# ecashin@makki ~$ su
+# Password:
+# bash# find /etc -type f -name udev.conf
+# /etc/udev/udev.conf
+# bash# grep udev_rules= /etc/udev/udev.conf
+# udev_rules="/etc/udev/rules.d/"
+# bash# ls /etc/udev/rules.d/
+# 10-wacom.rules 50-udev.rules
+# bash# cp /path/to/linux-2.6.xx/Documentation/aoe/udev.txt \
+# /etc/udev/rules.d/60-aoe.rules
+#
+
+# aoe char devices
+SUBSYSTEM="aoe", KERNEL="discover", NAME="etherd/%k", GROUP="disk", MODE="0220"
+SUBSYSTEM="aoe", KERNEL="err", NAME="etherd/%k", GROUP="disk", MODE="0440"
+SUBSYSTEM="aoe", KERNEL="interfaces", NAME="etherd/%k", GROUP="disk", MODE="0220"
+
+# aoe block devices
+KERNEL="etherd*", NAME="%k", GROUP="disk"
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-03-10 0:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-19 21:10 [PATCH] aoe: add documentation for udev users Ed L Cashin
2005-02-01 7:53 ` Greg KH
[not found] <fa.gl94rva.1tkib28@ifi.uio.no>
2005-01-20 3:07 ` Bodo Eggert
2005-01-20 14:19 ` Ed L Cashin
2005-02-01 7:53 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2005-03-10 0:19 [PATCH] AoE warning on 64-bit archs Greg KH
2005-03-10 0:19 ` [PATCH] aoe: add documentation for udev users Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.