From 86dd9696d3a1acb036d65909d93d73455b8aed3a Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Tue, 19 Feb 2008 14:54:17 +0200 Subject: Revert ubi-tools changes Restore ubi tools to their "original" state, which means to the state they were before I stareted cleaning them up. Instead, create a "new-utils" subdirectory and move my work there. Signed-off-by: Artem Bityutskiy --- ubi-utils/old-tools/scripts/mkdevs.pl | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100755 ubi-utils/old-tools/scripts/mkdevs.pl (limited to 'ubi-utils/old-tools/scripts/mkdevs.pl') diff --git a/ubi-utils/old-tools/scripts/mkdevs.pl b/ubi-utils/old-tools/scripts/mkdevs.pl deleted file mode 100755 index f0fd464..0000000 --- a/ubi-utils/old-tools/scripts/mkdevs.pl +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/perl -w - -# -# Author: Artem B. Bityutskiy -# -# A small scrip which creates UBI device nodes in /dev. UBI allocates -# major number dynamically, so the script looks at /proc/devices to find -# out UBI's major number. -# - - -my $proc = '/proc/devices'; -my $regexp = '(\d+) (ubi\d+)$'; - - -open FILE, "<", $proc or die "Cannot open $proc file: $!\n"; -my @file = ; -close FILE; - -foreach (@file) { - next if not m/$regexp/g; - print "found $2\n"; - - system("rm -rf /dev/$2"); - system("mknod /dev/$2 c $1 0"); - - for (my $i = 0; $i < 128; $i += 1) { - system("rm -rf /dev/$2_$i"); - my $j = $i + 1; - system("mknod /dev/$2_$i c $1 $j"); - } -} -- cgit v1.2.3