Skip to contentSkip to conversation

Fix makedevs to allow longer path names

PATCH New Julian Lunz 2 participants 2 messages Apr 8, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix makedevs to allow longer path names

Makedevs path name is currently limited to 40, changed it to PATH_MAX 4096 from linux/include/linux/limits.h

---
 package/makedevs/makedevs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
package/makedevs/makedevs.c +2 -2
index 5d5668d..ab90b93 100644
@@ -410,7 +410,7 @@ int main(int argc, char **argv)
 		unsigned int count = 0;
 		unsigned int increment = 0;
 		unsigned int start = 0;
-		char name[41];
+		char name[4096];
 		char user[41];
 		char group[41];
 		char *full_name;
@@ -419,7 +419,7 @@ int main(int argc, char **argv)
 
 		linenum++;
 
-		if ((2 > sscanf(line, "%40s %c %o %40s %40s %u %u %u %u %u", name,
+		if ((2 > sscanf(line, "%4095s %c %o %40s %40s %u %u %u %u %u", name,
 						&type, &mode, user, group, &major,
 						&minor, &start, &increment, &count)) ||
 				((major | minor | start | count | increment) > 0xfffff))
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH 1/1 Fix makedevs to allow longer path names

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Julian" == Julian Lunz <[email protected]> writes:

Julian> Makedevs path name is currently limited to 40, changed it to Julian> PATH_MAX 4096 from linux/include/linux/limits.h Julian> Signed-off-by: Julian Lunz <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard