Hi. On the way to create makedevs.test, I found naming differs from busybox if the count is 1. For example, Stdin for makedevs is "AAA c 1 0 0 2 5 0 0 1" And it makes AAA0 device instead of AAA. (Busybox makes AAA in this case) I'm not sure which one is correct, but think operation should follow common way.
diff --git a/toys/other/makedevs.c b/toys/other/makedevs.c
index 0d20a57..4b6b4b7 100644
--- a/toys/other/makedevs.c
+++ b/toys/other/makedevs.c
@@ -84,7 +84,7 @@ void makedevs_main()
while (*node == '/') node++; // using relative path
for (i = 0; (!cnt && !i) || i < cnt; i++) {
- if (cnt) {
+ if (cnt > 1) {
snprintf(toybuf, sizeof(toybuf), "%s%u", node, st_val + i);
ptr = toybuf;
} else ptr = node;
--
0001-makedevs-creating-device-name-with-devname-no-format.patch
Description: Binary data
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
