summaryrefslogtreecommitdiff
path: root/other/ecfs/repl.pl
diff options
context:
space:
mode:
authorRoot THC2026-02-24 12:42:47 +0000
committerRoot THC2026-02-24 12:42:47 +0000
commitc9cbeced5b3f2bdd7407e29c0811e65954132540 (patch)
treeaefc355416b561111819de159ccbd86c3004cf88 /other/ecfs/repl.pl
parent073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff)
initial
Diffstat (limited to 'other/ecfs/repl.pl')
-rw-r--r--other/ecfs/repl.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/other/ecfs/repl.pl b/other/ecfs/repl.pl
new file mode 100644
index 0000000..46e5b5b
--- /dev/null
+++ b/other/ecfs/repl.pl
@@ -0,0 +1,26 @@
1#!/usr/bin/perl
2
3# Written to transform ext2 functions and structs
4# to ecfs.
5#
6
7my $f= shift;
8open I, "<$f" or die "$!";
9open O, ">$f.new" or die "$!";
10
11while (<I>) {
12 s/ext2/ecfs/g;
13 s/EXT2/ECFS/g;
14
15 s/const// if (/ecfs_free_blocks/);
16 s/const// if (/ecfs_new_block/);
17
18 print O;
19}
20
21close O;
22close I;
23
24
25unlink $f;
26rename "$f.new", $f;