Print this page
XXX Remove nawk(1)
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/ucbcmd/sbcp/mksysent
+++ new/usr/src/ucbcmd/sbcp/mksysent
1 1 #!/bin/sh
2 2 #
3 3 # CDDL HEADER START
4 4 #
5 5 # The contents of this file are subject to the terms of the
6 6 # Common Development and Distribution License, Version 1.0 only
7 7 # (the "License"). You may not use this file except in compliance
8 8 # with the License.
9 9 #
10 10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 11 # or http://www.opensolaris.org/os/licensing.
12 12 # See the License for the specific language governing permissions
13 13 # and limitations under the License.
14 14 #
15 15 # When distributing Covered Code, include this CDDL HEADER in each
16 16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
17 17 # If applicable, add the following below this CDDL HEADER, with the
18 18 # fields enclosed by brackets "[]" replaced with your own identifying
19 19 # information: Portions Copyright [yyyy] [name of copyright owner]
20 20 #
21 21 # CDDL HEADER END
22 22 #
23 23 #
24 24 # Copyright 1993-2003 Sun Microsystems, Inc. All rights reserved.
25 25 # Use is subject to license terms.
26 26 #
27 -#pragma ident "%Z%%M% %I% %E% SMI"
28 -#
29 27 # mksysent - generate the sysent table from the list of system calls
30 28 #
31 -nawk '
29 +/usr/xpg4/bin/awk '
32 30 BEGIN {
33 31 print "#include <sys/asm_linkage.h>"
34 32 print "#include <sys/syscall.h>"
35 33 print ""
36 34 print "! This file is automatically generated from syscalls.list."
37 35 print "! Do not edit by hand or your changes will be lost."
38 36 print "! See mksysent and syscalls.list for details."
39 37 print ""
40 38 print " .section \".text\""
41 39 print " .align 4"
42 40 print "sysent:"
43 41 }
44 42 /^#/ { next; } # ignore comment lines
45 43 {
46 44 f = $1;
47 45 if ($2 == "TRAP") {
48 46 printf "! %s\n", f;
49 47 printf "\trestore\t%%g0, SYS_%s, %%g1\n", f;
50 48 printf "\tta\t8\n";
51 49 printf "\tjmp\t%%g6\n";
52 50 printf "\tnop\n";
53 51 } else if ($2 == "SIMPLE") {
54 52 printf "! %s\n", f;
55 53 printf "\t.global\t%s\n", f;
56 54 printf "\tcall\t%s\n", f;
57 55 printf "\tnop\n";
58 56 printf "\tb,a\ttrap0rtn\n";
59 57 printf "\tnop\n";
60 58 } else {
61 59 printf "! %s\n", f;
62 60 printf "\tb,a\tnosys\n";
63 61 printf "\tnop\n";
64 62 printf "\tnop\n";
65 63 printf "\tnop\n";
66 64 }
67 65 }
68 66 ' <syscalls.list
↓ open down ↓ |
27 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX