summaryrefslogtreecommitdiff
path: root/other/ecfs/repl.pl
blob: 46e5b5b0ea9255daaed370ddfe146f46b85cd073 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl

# Written to transform ext2 functions and structs
# to ecfs.
#

my $f= shift;
open I, "<$f" or die "$!";
open O, ">$f.new" or die "$!";

while (<I>) {
	s/ext2/ecfs/g;
	s/EXT2/ECFS/g;

	s/const// if (/ecfs_free_blocks/);
	s/const// if (/ecfs_new_block/);

	print O;
}

close O;
close I;

		
unlink $f;
rename "$f.new", $f;