summaryrefslogtreecommitdiff
path: root/ubi-utils/old-utils/scripts/mkdevs.pl
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-09-28 10:47:06 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-09-28 10:47:06 +0300
commit94a20240f9d6776619d7652013bb10131ddad1fc (patch)
treee92336c72820e7c6daa8468913fbcc523968d257 /ubi-utils/old-utils/scripts/mkdevs.pl
parent351ac23f8d468b2b9bc60dfcbaacbe3d55ec11f9 (diff)
ubi-utils: remove old ubi-utils
The utilities are unmaintained for long time, and many of them do not even work, just compile, and no on complains about this. This suggests they are unused and we can now safely kill them. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/old-utils/scripts/mkdevs.pl')
-rwxr-xr-xubi-utils/old-utils/scripts/mkdevs.pl32
1 files changed, 0 insertions, 32 deletions
diff --git a/ubi-utils/old-utils/scripts/mkdevs.pl b/ubi-utils/old-utils/scripts/mkdevs.pl
deleted file mode 100755
index f0fd464..0000000
--- a/ubi-utils/old-utils/scripts/mkdevs.pl
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/perl -w
-
-#
-# Author: Artem B. Bityutskiy <dedekind@oktetlabs.ru>
-#
-# 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 = <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");
- }
-}