Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 25 lines (18 sloc) 417 Bytes
#!/usr/bin/perl
use strict;
use warnings;
$/ = undef;
if(!open(KO, "wpthis.ko"))
{
print STDERR "Failed to open wpthis.ko\n";
exit 1;
}
if(!open(HEADER, ">", "wpthis-ko.h"))
{
print STDERR "Failed to open wpstat-ko.h\n";
exit 1;
}
my $ko = <KO>;
my @koArray = unpack('C*', $ko);
print HEADER "#include <stdint.h>\n";
print HEADER "static uint8_t wpthis_ko[] = {" . join(', ', @koArray), "};\n";