tools/testing/selftests/rcutorture/bin/kvm-transform.sh

Source file repositories/reference/linux-study-clean/tools/testing/selftests/rcutorture/bin/kvm-transform.sh

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/rcutorture/bin/kvm-transform.sh
Extension
.sh
Size
3266 bytes
Lines
140
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: tools
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

if (line == "") {
			line = $i;
		} else {
			line = line " " $i;
		}
		if ($i == "-serial") {
			i++;
			line = line " file:" consolelog;
		} else if ($i == "-kernel") {
			i++;
			line = line " " image;
		} else if ($i == "-append") {
			for (i++; i <= NF; i++) {
				arg = $i;
				lq = "";
				rq = "";
				if ("" seconds != "" && $i ~ /\.shutdown_secs=[0-9]*$/)
					sub(/[0-9]*$/, seconds, arg);
				if (arg ~ /^"/) {
					lq = substr(arg, 1, 1);
					arg  = substr(arg, 2);
				}
				if (arg ~ /"$/) {
					rq = substr(arg, length($i), 1);
					arg = substr(arg, 1, length($i) - 1);
				}
				par = arg;
				gsub(/=.*$/, "", par);
				j = 1;
				while (bootpar[j] != "") {
					if (bootpar[j] == par) {
						arg = "";
						break;
					}
					j++;
				}
				if (line == "")
					line = lq arg;
				else
					line = line " " lq arg;
			}
			for (j in bootarg)
				line = line " " bootarg[j];
			line = line rq;
		}
	}
	print line;
}
___EOF___

awk -v image="$image" -v consolelog="$consolelog" -v jitter_dir="$jitter_dir" \
    -v seconds="$seconds" -f $T/bootarg.awk

Annotation

Implementation Notes