Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(266)

Side by Side Diff: unix/mksysnum_freebsd.pl

Issue 121520043: code review 121520043: go.sys: update package names (Closed)
Patch Set: diff -r ad63a19ca444543ec83ec030d1200b0510f3f192 https://code.google.com/p/go.sys Created 10 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « unix/mksysnum_dragonfly.pl ('k') | unix/mksysnum_linux.pl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env perl 1 #!/usr/bin/env perl
2 # Copyright 2009 The Go Authors. All rights reserved. 2 # Copyright 2009 The Go Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style 3 # Use of this source code is governed by a BSD-style
4 # license that can be found in the LICENSE file. 4 # license that can be found in the LICENSE file.
5 # 5 #
6 # Generate system call table for FreeBSD from master list 6 # Generate system call table for FreeBSD from master list
7 # (for example, /usr/src/sys/kern/syscalls.master). 7 # (for example, /usr/src/sys/kern/syscalls.master).
8 8
9 use strict; 9 use strict;
10 10
11 my $command = "mksysnum_freebsd.pl " . join(' ', @ARGV); 11 my $command = "mksysnum_freebsd.pl " . join(' ', @ARGV);
12 12
13 print <<EOF; 13 print <<EOF;
14 // $command 14 // $command
15 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT 15 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
16 16
17 package syscall 17 package unix
18 18
19 const ( 19 const (
20 EOF 20 EOF
21 21
22 while(<>){ 22 while(<>){
23 if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){ 23 if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){
24 my $num = $1; 24 my $num = $1;
25 my $proto = $2; 25 my $proto = $2;
26 my $name = "SYS_$3"; 26 my $name = "SYS_$3";
27 $name =~ y/a-z/A-Z/; 27 $name =~ y/a-z/A-Z/;
(...skipping 19 matching lines...) Expand all
47 print " SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(i nt fd, \\\n"; 47 print " SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(i nt fd, \\\n";
48 print " SYS_CAP_ENTER = 516 // { int cap_enter(void); }\ n"; 48 print " SYS_CAP_ENTER = 516 // { int cap_enter(void); }\ n";
49 print " SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }\n"; 49 print " SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }\n";
50 } 50 }
51 } 51 }
52 } 52 }
53 53
54 print <<EOF; 54 print <<EOF;
55 ) 55 )
56 EOF 56 EOF
OLDNEW
« no previous file with comments | « unix/mksysnum_dragonfly.pl ('k') | unix/mksysnum_linux.pl » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b