⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makelilo.pl

📁 linux下从网卡远程启动
💻 PL
字号:
#!/usr/bin/perl -wuse constant SYSSIZE_LOC => 500;	# bytes from beginning of boot blockuse constant MINSIZE => 32768;use strict;use bytes;$#ARGV >= 1 or die "Usage: $0 liloprefix file ...\n";open(L, "$ARGV[0]") or die "$ARGV[0]: $!\n";undef($/);my $liloprefix = <L>;close(L);length($liloprefix) >= 512 or die "LILO prefix too short\n";shift(@ARGV);my $totalsize = 0;for my $file (@ARGV) {	next if (! -f $file or ! -r $file);	$totalsize += -s $file;}my $pad = 0;if ($totalsize < MINSIZE) {	$pad = MINSIZE - $totalsize;	$totalsize = MINSIZE;}print STDERR "LILO payload is $totalsize bytes\n";$totalsize += 16;$totalsize >>= 4;substr($liloprefix, SYSSIZE_LOC, 2) = pack('v', $totalsize);print $liloprefix;for my $file (@ARGV) {	next unless open(I, "$file");	undef($/);	my $data = <I>;	print $data;	close(I);}print "\x0" x $pad;exit(0);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -