All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix makedevs interpretation of device table
@ 2009-09-16 19:04 Antonio Ospite
  2009-09-18 18:50 ` Michael 'Mickey' Lauer
  0 siblings, 1 reply; 8+ messages in thread
From: Antonio Ospite @ 2009-09-16 19:04 UTC (permalink / raw)
  To: openembedded-devel

Currently makedevs is interpreting the 'count' field in device table as "count
from minor number 0", fix it so it becomes "count from the 'start' minor
number".

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
---
 recipes/makedevs/makedevs-1.0.0/makedevs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/recipes/makedevs/makedevs-1.0.0/makedevs.c b/recipes/makedevs/makedevs-1.0.0/makedevs.c
index c7ad722..80f21f0 100644
--- a/recipes/makedevs/makedevs-1.0.0/makedevs.c
+++ b/recipes/makedevs/makedevs-1.0.0/makedevs.c
@@ -221,7 +221,7 @@ static int interpret_table_entry(char *line)
 			dev_t rdev;
 			char buf[80];
 
-			for (i = start; i < count; i++) {
+			for (i = start; i < start+count; i++) {
 				sprintf(buf, "%s%d", name, i);
 				/* FIXME:  MKDEV uses illicit insider knowledge of kernel 
 				 * major/minor representation...  */
-- 
1.6.3.3




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix makedevs interpretation of device table
  2009-09-16 19:04 [PATCH] Fix makedevs interpretation of device table Antonio Ospite
@ 2009-09-18 18:50 ` Michael 'Mickey' Lauer
  2009-09-18 22:54   ` [PATCH] Fix files/device_table-ezx.txt Antonio Ospite
  0 siblings, 1 reply; 8+ messages in thread
From: Michael 'Mickey' Lauer @ 2009-09-18 18:50 UTC (permalink / raw)
  To: openembedded-devel

Thanks Antonion,

will our device tables have to be adapted for that? If so, could you patch 
this as well, please?

:M:



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] Fix files/device_table-ezx.txt
  2009-09-18 18:50 ` Michael 'Mickey' Lauer
@ 2009-09-18 22:54   ` Antonio Ospite
  2009-09-18 23:21     ` Michael 'Mickey' Lauer
  0 siblings, 1 reply; 8+ messages in thread
From: Antonio Ospite @ 2009-09-18 22:54 UTC (permalink / raw)
  To: openembedded-devel; +Cc: mickey

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
---

Hi Mickey, some misc fixes for our device table.

We won't need mux0 anymore, plus, I forgot to put the minor number in ttyIPC
and video dev nodes.

I waited to send this one because the mux entry could have been diffrent if
the makedevs patch would have not been accepted.

Ciao ciao,
   Antonio

 files/device_table-ezx.txt |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/files/device_table-ezx.txt b/files/device_table-ezx.txt
index f477a67..857a188 100644
--- a/files/device_table-ezx.txt
+++ b/files/device_table-ezx.txt
@@ -8,7 +8,7 @@
 #    b	Block special device file
 #    p	Fifo (named pipe)
 
-/dev/mux	c	660	0	5	250	0	1	1	8
-/dev/ttyIPC	c	660	0	5	251	0	-	-	-
+/dev/mux	c	660	0	5	250	1	1	1	8
+/dev/ttyIPC0	c	660	0	5	251	0	-	-	-
 /dev/input/uinput	c	660 	0	0	10	223	-	-	-
-/dev/video	c	660	0	44	81	0	-	-	-
+/dev/video0	c	660	0	44	81	0	-	-	-
-- 
1.6.4.3




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix files/device_table-ezx.txt
  2009-09-18 22:54   ` [PATCH] Fix files/device_table-ezx.txt Antonio Ospite
@ 2009-09-18 23:21     ` Michael 'Mickey' Lauer
  2009-09-19  8:41       ` Antonio Ospite
  0 siblings, 1 reply; 8+ messages in thread
From: Michael 'Mickey' Lauer @ 2009-09-18 23:21 UTC (permalink / raw)
  Cc: openembedded-devel

Thanks!

Someone on IRC alarmed that due to the now changed semantics we would need to 
change the present device tables as well. Can you confirm that?

:M:




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix files/device_table-ezx.txt
  2009-09-18 23:21     ` Michael 'Mickey' Lauer
@ 2009-09-19  8:41       ` Antonio Ospite
  2009-09-19 20:52         ` Andrea Adami
  0 siblings, 1 reply; 8+ messages in thread
From: Antonio Ospite @ 2009-09-19  8:41 UTC (permalink / raw)
  To: Michael 'Mickey' Lauer; +Cc: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]

On Sat, 19 Sep 2009 01:21:20 +0200
"Michael 'Mickey' Lauer" <mickey@vanille-media.de> wrote:

> Thanks!
> 
> Someone on IRC alarmed that due to the now changed semantics we would need to 
> change the present device tables as well. Can you confirm that?
> 
> :M:
>

Entries with the 'start' field > 0 should be checked, as now exactly
'start' more device nodes are created in this case, this shouldn't be a
great problem, tho. It is sufficient to set the 'count' field to
(count-start) to retain the current behavior if we really want to.

The affected entries are:

awk '{if (($0 !~ /^#/) && ($8 > 0)) print FILENAME ":\n" $0}' \
files/device_table*

And while we are at it, it could be worth documenting in device_table
header that the 'start' field is used for device node names, not for
minor numbers, and that the 'increment' field only applies to the
'minor' field, not to device node names; just to fade away any
ambiguity. Is this info available anywhere else?

Regards,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

[-- Attachment #2: Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix files/device_table-ezx.txt
  2009-09-19  8:41       ` Antonio Ospite
@ 2009-09-19 20:52         ` Andrea Adami
  2009-09-20 14:21           ` Antonio Ospite
  0 siblings, 1 reply; 8+ messages in thread
From: Andrea Adami @ 2009-09-19 20:52 UTC (permalink / raw)
  To: openembedded-devel

I was suggesting to mickey that some edits are needed.
I pointed specifically to dev/mmcblk0 which is supposed to populate
from p1 to p7 per specification.

Regards

Andrea



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix files/device_table-ezx.txt
  2009-09-19 20:52         ` Andrea Adami
@ 2009-09-20 14:21           ` Antonio Ospite
  2009-09-22 10:16             ` [PATCH] Fix the 'count' field in device_tables Antonio Ospite
  0 siblings, 1 reply; 8+ messages in thread
From: Antonio Ospite @ 2009-09-20 14:21 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

On Sat, 19 Sep 2009 22:52:04 +0200
Andrea Adami <andrea.adami@gmail.com> wrote:

> I was suggesting to mickey that some edits are needed.
> I pointed specifically to dev/mmcblk0 which is supposed to populate
> from p1 to p7 per specification.
>

Yes Andrea, without any changes to device table even p8 would be
created in this case. So no regressions AFAICS, sonly some extra, maybe
unneeded, device nodes.

I'll prepare a patch which fixes the 'count' field when 'start' > 0.

> Regards
> 
> Andrea
>

Ciao ciao,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

[-- Attachment #2: Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] Fix the 'count' field in device_tables.
  2009-09-20 14:21           ` Antonio Ospite
@ 2009-09-22 10:16             ` Antonio Ospite
  0 siblings, 0 replies; 8+ messages in thread
From: Antonio Ospite @ 2009-09-22 10:16 UTC (permalink / raw)
  To: openembedded-devel; +Cc: mickey

Line up to the new 'count' field semantics in makedevs, it now means "number
of device nodes to create" opposed to the old meaning "number of device nodes
to create as if the 'start' field was 0".

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
---
Mickey, Adrea,

Here is the changes to device table to keep the current behavior after the
proposed change to makedevs.

I don't know if other softwares use device_tables, is makedevs the only one?

Do you want me to post the whole patchset again for a clearer review and
to ease testing before applying? If so, Mickey you could discard the latest fix
to device_table-ezx.txt I've sent you recently, I'd split the changes relative
to this issue from the other unrelated fixes.

Regards,
   Antonio

 files/device_table-jlime.txt          |    2 +-
 files/device_table-minimal-add-md.txt |    2 +-
 files/device_table-minimal.txt        |    6 +++---
 files/device_table-slugos.txt         |   14 +++++++-------
 files/device_table-unslung.txt        |   12 ++++++------
 files/device_table_add-scsi.txt       |    2 +-
 6 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/files/device_table-jlime.txt b/files/device_table-jlime.txt
index d8fbc8e..314ad62 100644
--- a/files/device_table-jlime.txt
+++ b/files/device_table-jlime.txt
@@ -4,7 +4,7 @@
 /dev/apm_bios	c	660	0	46	10	134	-	-	-
 /dev/fb0	c	600	0	0	29	0	-	-	-
 /dev/hda	b	660	0	6	3	0	-	-	-
-/dev/hda	b	660	0	6	3	1	1	1	20
+/dev/hda	b	660	0	6	3	1	1	1	19
 /dev/kmem	c	640	0	15	1	2	-	-	-
 /dev/mem	c	640	0	15	1	1	-	-	-
 /dev/null	c	666	0	0	1	3	-	-	-
diff --git a/files/device_table-minimal-add-md.txt b/files/device_table-minimal-add-md.txt
index a78ca76..b30fdc3 100644
--- a/files/device_table-minimal-add-md.txt
+++ b/files/device_table-minimal-add-md.txt
@@ -13,7 +13,7 @@
 /dev/apm_bios	c	660	0	46	10	134	-	-	-
 /dev/fb0	c	600	0	0	29	0	-	-	-
 /dev/hda	b	660	0	6	3	0	-	-	-
-/dev/hda	b	660	0	6	3	1	1	1	5
+/dev/hda	b	660	0	6	3	1	1	1	4
 /dev/kmem	c	640	0	15	1	2	-	-	-
 /dev/mem	c	640	0	15	1	1	-	-	-
 /dev/null	c	666	0	0	1	3	-	-	-
diff --git a/files/device_table-minimal.txt b/files/device_table-minimal.txt
index 891feb0..a474377 100644
--- a/files/device_table-minimal.txt
+++ b/files/device_table-minimal.txt
@@ -13,7 +13,7 @@
 /dev/apm_bios	c	660	0	46	10	134	-	-	-
 /dev/fb0	c	600	0	0	29	0	-	-	-
 /dev/hda	b	660	0	6	3	0	-	-	-
-/dev/hda	b	660	0	6	3	1	1	1	20
+/dev/hda	b	660	0	6	3	1	1	1	19
 /dev/kmem	c	640	0	15	1	2	-	-	-
 /dev/mem	c	640	0	15	1	1	-	-	-
 /dev/null	c	666	0	0	1	3	-	-	-
@@ -33,10 +33,10 @@
 /dev/event 	c	660	0	0	13	64	0	1	8
 
 /dev/mmcblk0	b	660	0	6	179	0	-	-	-
-/dev/mmcblk0p	b	660	0	6	179	1	1	1	8
+/dev/mmcblk0p	b	660	0	6	179	1	1	1	7
 
 # for older kernels before 2.6.22
 # mmc numbers are assigned dynamicly so if you have other dynamic assigned block devices it may be wrong
 #
 #/dev/mmcblk0    b       660     0       6       254     0       -       -       -
-#/dev/mmcblk0p   b       660     0       6       254     1       1       1       8
+#/dev/mmcblk0p   b       660     0       6       254     1       1       1       7
diff --git a/files/device_table-slugos.txt b/files/device_table-slugos.txt
index 17e8064..94b3c49 100644
--- a/files/device_table-slugos.txt
+++ b/files/device_table-slugos.txt
@@ -20,19 +20,19 @@
 /dev/ram	b	644	0	0	1	0	0	1	4
 /dev/random	c	644	0	0	1	8	-	-	-
 /dev/sda	b	664	0	0	8	0	-	-	-
-/dev/sda	b	664	0	0	8	1	1	1	10
+/dev/sda	b	664	0	0	8	1	1	1	9
 /dev/sdb	b	664	0	0	8	16	-	-	-
-/dev/sdb	b	664	0	0	8	17	1	1	5
+/dev/sdb	b	664	0	0	8	17	1	1	4
 /dev/sdc	b	664	0	0	8	32	-	-	-
-/dev/sdc	b	664	0	0	8	33	1	1	5
+/dev/sdc	b	664	0	0	8	33	1	1	4
 /dev/sdd        b       664     0       0       8       48      -       -	-
-/dev/sdd        b       664     0       0       8       49      1       1	5
+/dev/sdd	b	664	0	0	8	49	1	1	4
 /dev/sde        b       664     0       0       8       64      -       -	-
-/dev/sde        b       664     0       0       8       65      1       1	5
+/dev/sde	b	664	0	0	8	65	1	1	4
 /dev/sdf        b       664     0       0       8       80      -       -	-
-/dev/sdf        b       664     0       0       8       81      1       1	5
+/dev/sdf	b	664	0	0	8	81	1	1	4
 /dev/sdg        b       664     0       0       8       96      -       -	-
-/dev/sdg        b       664     0       0       8       97      1       1	5
+/dev/sdg	b	664	0	0	8	97	1	1	4
 /dev/tty	c	666	0	0	5	0	-	-	-
 /dev/tty	c	644	0	0	4	0	0	1	10
 /dev/ttyS	c	644	0	0	4	64	0	1	2
diff --git a/files/device_table-unslung.txt b/files/device_table-unslung.txt
index cd5d5f7..64a1dc1 100644
--- a/files/device_table-unslung.txt
+++ b/files/device_table-unslung.txt
@@ -20,7 +20,7 @@
 /dev/mem	c	640	0	0	1	1	-	-	-
 /dev/mtd	c	664	0	0	90	0	0	2	8
 /dev/mtdblock	b	644	0	0	31	0	0	1	8
-/dev/mtdr	c	664	0	0	90	0	1	2	8
+/dev/mtdr	c	664	0	0	90	0	1	2	7
 /dev/null	c	666	0	0	1	3	-	-	-
 /dev/pbuttons	c	664	0	0	60	0	-	-	-
 /dev/ppp	c	644	0	0	108	0	-	-	-
@@ -31,15 +31,15 @@
 /dev/rtc	c	644	0	0	10	135	-	-	-
 /dev/scd	b	664	0	0	11	0	0	1	4
 /dev/sda	b	664	0	0	8	0	-	-	-
-/dev/sda	b	664	0	0	8	1	1	1	16
+/dev/sda	b	664	0	0	8	1	1	1	15
 /dev/sdb	b	664	0	0	8	16	-	-	-
-/dev/sdb	b	664	0	0	8	17	1	1	16
+/dev/sdb	b	664	0	0	8	17	1	1	15
 /dev/sdc	b	664	0	0	8	32	-	-	-
-/dev/sdc	b	664	0	0	8	33	1	1	16
+/dev/sdc	b	664	0	0	8	33	1	1	15
 /dev/sdd	b	664	0	0	8	48	-	-	-
-/dev/sdd	b	664	0	0	8	49	1	1	16
+/dev/sdd	b	664	0	0	8	49	1	1	15
 /dev/sde	b	664	0	0	8	64	-	-	-
-/dev/sde	b	664	0	0	8	65	1	1	16
+/dev/sde	b	664	0	0	8	65	1	1	15
 /dev/st		c	664	0	0	9	0	0	1	4
 /dev/tty	c	666	0	0	5	0	-	-	-
 /dev/tty	c	644	0	0	4	0	0	1	10
diff --git a/files/device_table_add-scsi.txt b/files/device_table_add-scsi.txt
index 74d7725..b672cbb 100644
--- a/files/device_table_add-scsi.txt
+++ b/files/device_table_add-scsi.txt
@@ -1,2 +1,2 @@
 /dev/sda	b	660	0	6	8	0	-	-	-
-/dev/sda	b	660	0	6	8	1	1	1	16
+/dev/sda	b	660	0	6	8	1	1	1	15
-- 
1.6.4.3




^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-09-22 10:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-16 19:04 [PATCH] Fix makedevs interpretation of device table Antonio Ospite
2009-09-18 18:50 ` Michael 'Mickey' Lauer
2009-09-18 22:54   ` [PATCH] Fix files/device_table-ezx.txt Antonio Ospite
2009-09-18 23:21     ` Michael 'Mickey' Lauer
2009-09-19  8:41       ` Antonio Ospite
2009-09-19 20:52         ` Andrea Adami
2009-09-20 14:21           ` Antonio Ospite
2009-09-22 10:16             ` [PATCH] Fix the 'count' field in device_tables Antonio Ospite

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.