Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v4 0/5] Fixes for makedevs
@ 2013-05-31 11:36 Peter Kjellerstedt
  2013-05-31 11:36 ` [PATCH v4 5/5] makedevs: Make count actually behave as a count for device blocks Peter Kjellerstedt
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Kjellerstedt @ 2013-05-31 11:36 UTC (permalink / raw)
  To: openembedded-core

When I wanted to create devices from a package I stumbled upon a couple
of problems with the makedevs program. Most notable was that it failed
to set the correct uid/gid for devices created as part of a block (i.e.,
with a count > 0).

PATCH v2: And now with Signed-off-by lines, as requested.

PATCH v3: Also made count for blocks of devices behave as a count rather
than the end (noticed after looking a makedevs.c from BusyBox).

PATCH v4: Added a Signed-off-by to the fifth patch. Will only resend it
as the other patches have already been accepted.
The following changes since commit efb8a460d2a977dbd481a0650fba8eb637c65bec:

  package.bbclass: Fix sources contents (2013-05-14 08:52:47 +0300)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib pkj/makedevs
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/makedevs

Peter Kjellerstedt (5):
  makedevs: Create blocks of devices with the correct uid/gid
  makedevs: Correct the device number calculation for blocks of devices
  makedevs: Make the mode number readable in debug messages
  makedevs: Avoid unnecessary timestamp calculation
  makedevs: Make count actually behave as a count for device blocks

 meta/files/device_table-minimal.txt                   |  2 +-
 .../makedevs/makedevs-1.0.0/makedevs.c                | 19 +++++++++----------
 2 files changed, 10 insertions(+), 11 deletions(-)

-- 
1.8.2.1



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

* [PATCH v4 5/5] makedevs: Make count actually behave as a count for device blocks
  2013-05-31 11:36 [PATCH v4 0/5] Fixes for makedevs Peter Kjellerstedt
@ 2013-05-31 11:36 ` Peter Kjellerstedt
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Kjellerstedt @ 2013-05-31 11:36 UTC (permalink / raw)
  To: openembedded-core

Previously count actually behaved as end, and did not take start into
account.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/files/device_table-minimal.txt                      | 2 +-
 meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/files/device_table-minimal.txt b/meta/files/device_table-minimal.txt
index c6e5463..02ed534 100644
--- a/meta/files/device_table-minimal.txt
+++ b/meta/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/kmsg	c	600	0	0	1	11	-	-	-
 /dev/mem	c	640	0	15	1	1	-	-	-
diff --git a/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
index 4bb316b..6c1f2fb 100644
--- a/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
+++ b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
@@ -219,7 +219,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);
 				sprintf(path, "%s/%s%d", rootdir, name, i);
 				/* FIXME:  MKDEV uses illicit insider knowledge of kernel 
-- 
1.8.2.1



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

end of thread, other threads:[~2013-05-31 11:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-31 11:36 [PATCH v4 0/5] Fixes for makedevs Peter Kjellerstedt
2013-05-31 11:36 ` [PATCH v4 5/5] makedevs: Make count actually behave as a count for device blocks Peter Kjellerstedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox