Lines Matching +full:- +full:- +full:print +full:- +full:architecture

2 # SPDX-License-Identifier: GPL-2.0
23 # Used only at for full features output. The script will auto-adjust
35 "enable-fname" => \$enable_fname,
40 pod2usage(-exitstatus => 0, -verbose => 2) if $man;
62 print STDERR "Warning: file $file#$ln:\n\t$msg";
65 print STDERR ". Line\n\t\t$data";
67 print STDERR "\n";
80 my $h_arch = "Architecture";
97 return if ($file =~ m,($prefix)/arch-support.txt,);
98 return if (!($file =~ m,arch-support.txt$,));
119 print STDERR "Opening $file\n" if ($debug > 1);
154 next if (m/^\s*\-+\s*$/);
172 $status = "---" if ($status =~ m/^\.\.$/);
194 parse_error($file, $ln, "Architecture table not found", "");
198 $data{$name}->{where} = $file;
199 $data{$name}->{subsys} = $subsys;
200 $data{$name}->{kconfig} = $kconfig;
201 $data{$name}->{description} = $description;
202 $data{$name}->{comments} = $comments;
203 $data{$name}->{table} = \%arch_table;
209 # Output feature(s) for a given architecture
212 my $title = "Feature status on $arch architecture";
214 print "=" x length($title) . "\n";
215 print "$title\n";
216 print "=" x length($title) . "\n\n";
218 print "=" x $max_size_subsys;
219 print " ";
220 print "=" x $max_size_name;
221 print " ";
222 print "=" x $max_size_kconfig;
223 print " ";
224 print "=" x $max_size_status;
225 print " ";
226 print "=" x $max_size_description;
227 print "\n";
228 printf "%-${max_size_subsys}s ", $h_subsys;
229 printf "%-${max_size_name}s ", $h_name;
230 printf "%-${max_size_kconfig}s ", $h_kconfig;
231 printf "%-${max_size_status}s ", $h_status;
232 printf "%-${max_size_description}s\n", $h_description;
233 print "=" x $max_size_subsys;
234 print " ";
235 print "=" x $max_size_name;
236 print " ";
237 print "=" x $max_size_kconfig;
238 print " ";
239 print "=" x $max_size_status;
240 print " ";
241 print "=" x $max_size_description;
242 print "\n";
245 ($data{$a}->{subsys} cmp $data{$b}->{subsys}) ||
250 my %arch_table = %{$data{$name}->{table}};
251 printf "%-${max_size_subsys}s ", $data{$name}->{subsys};
252 printf "%-${max_size_name}s ", $name;
253 printf "%-${max_size_kconfig}s ", $data{$name}->{kconfig};
254 printf "%-${max_size_status}s ", $arch_table{$arch};
255 printf "%-s\n", $data{$name}->{description};
258 print "=" x $max_size_subsys;
259 print " ";
260 print "=" x $max_size_name;
261 print " ";
262 print "=" x $max_size_kconfig;
263 print " ";
264 print "=" x $max_size_status;
265 print " ";
266 print "=" x $max_size_description;
267 print "\n";
271 # list feature(s) for a given architecture
274 print "#\n# Kernel feature support matrix of the '$arch' architecture:\n#\n";
277 ($data{$a}->{subsys} cmp $data{$b}->{subsys}) ||
282 my %arch_table = %{$data{$name}->{table}};
285 $status = " " x ((4 - length($status)) / 2) . $status;
287 printf " %${max_size_subsys}s/ ", $data{$name}->{subsys};
288 printf "%-${max_size_name}s: ", $name;
289 printf "%-5s| ", $status;
290 printf "%${max_size_kconfig}s # ", $data{$name}->{kconfig};
291 printf " %s\n", $data{$name}->{description};
301 print "=" x length($title) . "\n";
302 print "$title\n";
303 print "=" x length($title) . "\n\n";
305 print ":Subsystem: $data{$feat}->{subsys} \n" if ($data{$feat}->{subsys});
306 print ":Kconfig: $data{$feat}->{kconfig} \n" if ($data{$feat}->{kconfig});
308 my $desc = $data{$feat}->{description};
309 $desc =~ s/^([a-z])/\U$1/;
311 print "\n$desc.\n\n";
313 my $com = $data{$feat}->{comments};
317 print "Comments\n";
318 print "--------\n\n";
319 print "$com\n\n";
322 print "=" x $max_size_arch_with_header;
323 print " ";
324 print "=" x $max_size_status;
325 print "\n";
327 printf "%-${max_size_arch}s ", $h_arch;
328 printf "%-${max_size_status}s", $h_status . "\n";
330 print "=" x $max_size_arch_with_header;
331 print " ";
332 print "=" x $max_size_status;
333 print "\n";
335 my %arch_table = %{$data{$feat}->{table}};
337 printf "%-${max_size_arch}s ", $arch;
338 printf "%-${max_size_status}s\n", $arch_table{$arch};
341 print "=" x $max_size_arch_with_header;
342 print " ";
343 print "=" x $max_size_status;
344 print "\n";
361 $ln_marker = "-";
366 print "+";
367 print $fill x $max_size_name;
368 print "+";
369 print $fill x $desc_size;
370 print "+";
371 print $ln_marker x $status_size;
372 print "+\n";
379 print "=" x length($title) . "\n";
380 print "$title\n";
381 print "=" x length($title) . "\n\n";
404 ($data{$a}->{subsys} cmp $data{$b}->{subsys}) or
408 if ($cur_subsys ne $data{$name}->{subsys}) {
413 $cur_subsys = $data{$name}->{subsys};
416 print "$title\n";
417 print "=" x length($title) . "\n\n";
422 printf "|%-${max_size_name}s", $h_name;
423 printf "|%-${desc_size}s", $desc_title;
425 printf "|%-${status_size}s|\n", "Status per architecture";
429 my %arch_table = %{$data{$name}->{table}};
441 if ($status eq "---") {
450 $line = "- **" . $status . "**: " . $arch;
461 my $description = $data{$name}->{description};
467 # Instead of aborting it, let's print what we have
469 $d = substr $d, 0, -1;
485 printf "|%-${max_size_name}s", $name;
486 printf "|%-${desc_size}s", "``" . $data{$name}->{kconfig} . "``";
488 printf "|%-${max_size_name}s", "";
489 printf "|%-${desc_size}s", shift @descs;
491 printf "|%-${max_size_name}s", "";
492 printf "|%-${desc_size}s", "";
495 printf "|%-${status_size}s|\n", $line;
509 print STDERR Data::Dumper->Dump([\%data], [qw(*data)]) if ($debug);
515 $arch = qx(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/');
521 $arch = qx(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/');
544 get_feat.pl - parse the Linux Feature files and produce a ReST book.
548 B<get_feat.pl> [--debug] [--man] [--help] [--dir=<dir>] [--arch=<arch>]
549 [--feature=<feature>|--feat=<feature>] <COMAND> [<ARGUMENT>]
555 B<current> - output table in ReST compatible ASCII format
556 with features for this machine's architecture
558 B<rest> - output table(s) in ReST compatible ASCII format
560 is affected by --arch or --feat/--feature flags.
562 B<validate> - validate the contents of the files under
565 B<ls> or B<list> - list features for this machine's architecture,
567 The output is affected by --arch flag.
575 =item B<--arch>
577 Output features for an specific architecture, optionally filtering for
580 =item B<--feat> or B<--feature>
584 =item B<--dir>
589 =item B<--enable-fname>
594 =item B<--debug>
599 =item B<--help>
603 =item B<--man>
614 It supports output data per architecture, per feature or a
619 If neither B<--arch> or B<--feature> arguments are used, it will output a
620 matrix with features per architecture.
622 If B<--arch> argument is used, it will output the features availability for
623 a given architecture.
625 If B<--feat> argument is used, it will output the content of the feature