[oe-commits] [openembedded-core] 11/25: makedevs: don't restrict device node paths to 40 characters

git at git.openembedded.org git at git.openembedded.org
Thu Sep 15 21:57:35 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit d0ceb137fff8aa131749e91456951d66448a1552
Author: Andre McCurdy <armccurdy at gmail.com>
AuthorDate: Mon Sep 12 13:14:05 2016 -0700

    makedevs: don't restrict device node paths to 40 characters
    
    40 character paths work OK for device nodes in /dev but not for
    device nodes created in a chroot, LXC container, etc.
    
    Since the 'path' array is already a 4k buffer, the sscanf 40
    character limit seems to be a typo or historical mis-merge. Update
    the sscanf limit and bring the code in sync with the Buildroot
    version:
    
      https://git.buildroot.net/buildroot/commit/?id=8876b6751e0bc19a3754290061808f0f8420708e
    
    Signed-off-by: Andre McCurdy <armccurdy at gmail.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/recipes-devtools/makedevs/makedevs/makedevs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/makedevs/makedevs/makedevs.c b/meta/recipes-devtools/makedevs/makedevs/makedevs.c
index 7471f3f..cba7681 100644
--- a/meta/recipes-devtools/makedevs/makedevs/makedevs.c
+++ b/meta/recipes-devtools/makedevs/makedevs/makedevs.c
@@ -360,7 +360,7 @@ static int interpret_table_entry(char *line)
 	unsigned long mode = 0755, uid = 0, gid = 0, major = 0, minor = 0;
 	unsigned long start = 0, increment = 1, count = 0;
 
-	if (0 > sscanf(line, "%40s %c %lo %40s %40s %lu %lu %lu %lu %lu", path,
+	if (0 > sscanf(line, "%4095s %c %lo %40s %40s %lu %lu %lu %lu %lu", path,
 		    &type, &mode, usr_buf, grp_buf, &major, &minor, &start,
 		    &increment, &count))
 	{

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list