OSDN Git Service

PR go/47515
[pf3gnuchains/gcc-fork.git] / libgo / mksysinfo.sh
1 #!/bin/sh
2
3 # Copyright 2009 The Go Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style
5 # license that can be found in the LICENSE file.
6
7 # Create sysinfo.go.
8
9 # This shell script creates the sysinfo.go file which holds types and
10 # constants extracted from the system header files.  This relies on a
11 # hook in gcc: the -fdump-go-spec option will generate debugging
12 # information in Go syntax.
13
14 # We currently #include all the files at once, which works, but leads
15 # to exposing some names which ideally should not be exposed, as they
16 # match grep patterns.  E.g., WCHAR_MIN gets exposed because it starts
17 # with W, like the wait flags.
18
19 CC=${CC:-gcc}
20 OUT=tmp-sysinfo.go
21
22 set -e
23
24 rm -f sysinfo.c
25 cat > sysinfo.c <<EOF
26 #include "config.h"
27
28 #define _GNU_SOURCE
29 #define _LARGEFILE_SOURCE
30 #define _FILE_OFFSET_BITS 64
31
32 #if defined(__sun__) && defined(__svr4__)
33 /* Needed by Solaris header files.  */
34 #define _XOPEN_SOURCE 600
35 #define __EXTENSIONS__
36 #endif
37
38 #ifdef __sgi__
39 /* IRIX 6 needs _XOPEN_SOURCE=500 for the XPG5 version of struct msghdr in
40    <sys/socket.h>.  */
41 #define _XOPEN_SOURCE 500
42 #endif
43
44 #include <sys/types.h>
45 #include <dirent.h>
46 #include <errno.h>
47 #include <fcntl.h>
48 #include <netinet/in.h>
49 /* <netinet/tcp.h> needs u_char/u_short, but <sys/bsd_types> is only
50    included by <netinet/in.h> if _SGIAPI (i.e. _SGI_SOURCE
51    && !_XOPEN_SOURCE.  */
52 #ifdef __sgi__
53 #include <sys/bsd_types.h>
54 #endif
55 #include <netinet/tcp.h>
56 #include <signal.h>
57 #if defined(HAVE_SYSCALL_H)
58 #include <syscall.h>
59 #endif
60 #if defined(HAVE_SYS_SYSCALL_H)
61 #include <sys/syscall.h>
62 #endif
63 #if defined(HAVE_SYS_EPOLL_H)
64 #include <sys/epoll.h>
65 #endif
66 #if defined(HAVE_SYS_PTRACE_H)
67 #include <sys/ptrace.h>
68 #endif
69 #include <sys/resource.h>
70 #include <sys/uio.h>
71 #include <sys/socket.h>
72 #include <sys/stat.h>
73 #include <sys/time.h>
74 #include <sys/wait.h>
75 #include <sys/un.h>
76 #if defined(HAVE_SYS_USER_H)
77 #include <sys/user.h>
78 #endif
79 #if defined(HAVE_SYS_UTSNAME_H)
80 #include <sys/utsname.h>
81 #endif
82 #include <unistd.h>
83 EOF
84
85 ${CC} -fdump-go-spec=gen-sysinfo.go -std=gnu99 -S -o sysinfo.s sysinfo.c
86
87 echo 'package syscall' > ${OUT}
88
89 # Get all the consts and types, skipping ones which could not be
90 # represented in Go and ones which we need to rewrite.  We also skip
91 # function declarations, as we don't need them here.  All the symbols
92 # will all have a leading underscore.
93 grep -v '^// ' gen-sysinfo.go | \
94   grep -v '^func' | \
95   grep -v '^type _timeval ' | \
96   grep -v '^type _timespec\(_t\)\? ' | \
97   grep -v '^type _timestruc_t ' | \
98   grep -v '^type _epoll_' | \
99   grep -v 'in6_addr' | \
100   grep -v 'sockaddr_in6' | \
101   sed -e 's/\([^a-zA-Z0-9_]\)_timeval\([^a-zA-Z0-9_]\)/\1Timeval\2/g' \
102       -e 's/\([^a-zA-Z0-9_]\)_timespec\(_t\)\?\([^a-zA-Z0-9_]\)/\1Timespec\3/g' \
103       -e 's/\([^a-zA-Z0-9_]\)_timestruc_t\([^a-zA-Z0-9_]\)/\1Timestruc\2/g' \
104     >> ${OUT}
105
106 # The errno constants.
107 grep '^const _E' gen-sysinfo.go | \
108   sed -e 's/^\(const \)_\(E[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
109
110 # The O_xxx flags.
111 grep '^const _\(O\|F\|FD\)_' gen-sysinfo.go | \
112   sed -e 's/^\(const \)_\([^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
113 if ! grep '^const O_ASYNC' ${OUT} >/dev/null 2>&1; then
114   echo "const O_ASYNC = 0" >> ${OUT}
115 fi
116 if ! grep '^const O_CLOEXEC' ${OUT} >/dev/null 2>&1; then
117   echo "const O_CLOEXEC = 0" >> ${OUT}
118 fi
119
120 # The signal numbers.
121 grep '^const _SIG[^_]' gen-sysinfo.go | \
122   grep -v '^const _SIGEV_' | \
123   sed -e 's/^\(const \)_\(SIG[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
124
125 # The syscall numbers.  We force the names to upper case.
126 grep '^const _SYS_' gen-sysinfo.go | \
127   sed -e 's/const _\(SYS_[^= ]*\).*$/\1/' | \
128   while read sys; do
129     sup=`echo $sys | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
130     echo "const $sup = _$sys" >> ${OUT}
131   done
132
133 # Stat constants.
134 grep '^const _S_' gen-sysinfo.go | \
135   sed -e 's/^\(const \)_\(S_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
136
137 # Process status constants.
138 grep '^const _W' gen-sysinfo.go |
139   sed -e 's/^\(const \)_\(W[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
140 # WSTOPPED was introduced in glibc 2.3.4.
141 if ! grep '^const _WSTOPPED = ' gen-sysinfo.go >/dev/null 2>&1; then
142   if grep '^const _WUNTRACED = ' gen-sysinfo.go > /dev/null 2>&1; then
143     echo 'const WSTOPPED = _WUNTRACED' >> ${OUT}
144   else
145     echo 'const WSTOPPED = 2' >> ${OUT}
146   fi
147 fi
148 if grep '^const ___WALL = ' gen-sysinfo.go >/dev/null 2>&1 \
149    && ! grep '^const _WALL = ' gen-sysinfo.go >/dev/null 2>&1; then
150   echo 'const WALL = ___WALL' >> ${OUT}
151 fi
152
153 # Networking constants.
154 grep '^const _\(AF\|SOCK\|SOL\|SO\|IPPROTO\|TCP\|IP\|IPV6\)_' gen-sysinfo.go |
155   sed -e 's/^\(const \)_\([^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
156 grep '^const _SOMAXCONN' gen-sysinfo.go |
157   sed -e 's/^\(const \)_\(SOMAXCONN[^= ]*\)\(.*\)$/\1\2 = _\2/' \
158     >> ${OUT}
159 grep '^const _SHUT_' gen-sysinfo.go |
160   sed -e 's/^\(const \)_\(SHUT[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
161
162 # The net package requires a definition for IPV6ONLY.
163 if ! grep '^const IPV6_V6ONLY ' ${OUT} >/dev/null 2>&1; then
164   echo "const IPV6_V6ONLY = 0" >> ${OUT}
165 fi
166
167 # pathconf constants.
168 grep '^const __PC' gen-sysinfo.go |
169   sed -e 's/^\(const \)__\(PC[^= ]*\)\(.*\)$/\1\2 = __\2/' >> ${OUT}
170
171 # The epoll constants were picked up by the errno constants, but we
172 # need to be sure the EPOLLRDHUP is defined.
173 if ! grep '^const EPOLLRDHUP' ${OUT} >/dev/null 2>&1; then
174   echo "const EPOLLRDHUP = 0x2000" >> ${OUT}
175 fi
176
177 # Ptrace constants.  We don't expose all the PTRACE flags, just the
178 # PTRACE_O_xxx and PTRACE_EVENT_xxx ones.
179 grep '^const _PTRACE_O' gen-sysinfo.go |
180   sed -e 's/^\(const \)_\(PTRACE_O[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
181 grep '^const _PTRACE_EVENT' gen-sysinfo.go |
182   sed -e 's/^\(const \)_\(PTRACE_EVENT[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
183 # We need PTRACE_SETOPTIONS and PTRACE_GETEVENTMSG, but they are not
184 # defined in older versions of glibc.
185 if ! grep '^const _PTRACE_SETOPTIONS' ${OUT} > /dev/null 2>&1; then
186   echo "const _PTRACE_SETOPTIONS = 0x4200" >> ${OUT}
187 fi
188 if ! grep '^const PTRACE_O_TRACESYSGOOD' ${OUT} > /dev/null 2>&1; then
189   echo "const PTRACE_O_TRACESYSGOOD = 0x1" >> ${OUT}
190 fi
191 if ! grep '^const PTRACE_O_TRACEFORK' ${OUT} > /dev/null 2>&1; then
192   echo "const PTRACE_O_TRACEFORK = 0x2" >> ${OUT}
193 fi
194 if ! grep '^const PTRACE_O_TRACEVFORK' ${OUT} > /dev/null 2>&1; then
195   echo "const PTRACE_O_TRACEVFORK = 0x4" >> ${OUT}
196 fi
197 if ! grep '^const PTRACE_O_TRACECLONE' ${OUT} > /dev/null 2>&1; then
198   echo "const PTRACE_O_TRACECLONE = 0x8" >> ${OUT}
199 fi
200 if ! grep '^const PTRACE_O_TRACEEXEC' ${OUT} > /dev/null 2>&1; then
201   echo "const PTRACE_O_TRACEEXEC = 0x10" >> ${OUT}
202 fi
203 if ! grep '^const PTRACE_O_TRACEVFORKDONE' ${OUT} > /dev/null 2>&1; then
204   echo "const PTRACE_O_TRACEVFORKDONE = 0x20" >> ${OUT}
205 fi
206 if ! grep '^const PTRACE_O_TRACEEXIT' ${OUT} > /dev/null 2>&1; then
207   echo "const PTRACE_O_TRACEEXIT = 0x40" >> ${OUT}
208 fi
209 if ! grep '^const PTRACE_O_MASK' ${OUT} > /dev/null 2>&1; then
210   echo "const PTRACE_O_MASK = 0x7f" >> ${OUT}
211 fi
212 if ! grep '^const _PTRACE_GETEVENTMSG' ${OUT} > /dev/null 2>&1; then
213   echo "const _PTRACE_GETEVENTMSG = 0x4201" >> ${OUT}
214 fi
215 if ! grep '^const PTRACE_EVENT_FORK' ${OUT} > /dev/null 2>&1; then
216   echo "const PTRACE_EVENT_FORK = 1" >> ${OUT}
217 fi
218 if ! grep '^const PTRACE_EVENT_VFORK' ${OUT} > /dev/null 2>&1; then
219   echo "const PTRACE_EVENT_VFORK = 2" >> ${OUT}
220 fi
221 if ! grep '^const PTRACE_EVENT_CLONE' ${OUT} > /dev/null 2>&1; then
222   echo "const PTRACE_EVENT_CLONE = 3" >> ${OUT}
223 fi
224 if ! grep '^const PTRACE_EVENT_EXEC' ${OUT} > /dev/null 2>&1; then
225   echo "const PTRACE_EVENT_EXEC = 4" >> ${OUT}
226 fi
227 if ! grep '^const PTRACE_EVENT_VFORK_DONE' ${OUT} > /dev/null 2>&1; then
228   echo "const PTRACE_EVENT_VFORK_DONE = 5" >> ${OUT}
229 fi
230 if ! grep '^const PTRACE_EVENT_EXIT' ${OUT} > /dev/null 2>&1; then
231   echo "const PTRACE_EVENT_EXIT = 6" >> ${OUT}
232 fi
233 if ! grep '^const _PTRACE_TRACEME' ${OUT} > /dev/null 2>&1; then
234   echo "const _PTRACE_TRACEME = 0" >> ${OUT}
235 fi
236
237 # The registers returned by PTRACE_GETREGS.  This is probably
238 # GNU/Linux specific; it should do no harm if there is no
239 # _user_regs_struct.
240 regs=`grep '^type _user_regs_struct struct' gen-sysinfo.go || true`
241 if test "$regs" != ""; then
242   regs=`echo $regs | sed -e 's/type _user_regs_struct struct //' -e 's/[{}]//g'`
243   regs=`echo $regs | sed -e s'/^ *//'`
244   nregs=
245   while test -n "$regs"; do
246     field=`echo $regs | sed -e 's/^\([^;]*\);.*$/\1/'`
247     regs=`echo $regs | sed -e 's/^[^;]*; *\(.*\)$/\1/'`
248     # Capitalize the first character of the field.
249     f=`echo $field | sed -e 's/^\(.\).*$/\1/'`
250     r=`echo $field | sed -e 's/^.\(.*\)$/\1/'`
251     f=`echo $f | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
252     field="$f$r"
253     nregs="$nregs $field;"
254   done
255   echo "type PtraceRegs struct {$nregs }" >> ${OUT}
256 fi
257
258 # Some basic types.
259 echo 'type Size_t _size_t' >> ${OUT}
260 echo "type Ssize_t _ssize_t" >> ${OUT}
261 if grep '^const _HAVE_OFF64_T = ' gen-sysinfo.go > /dev/null 2>&1; then
262   echo "type Offset_t _off64_t" >> ${OUT}
263 else
264   echo "type Offset_t _off_t" >> ${OUT}
265 fi
266 echo "type Mode_t _mode_t" >> ${OUT}
267 echo "type Pid_t _pid_t" >> ${OUT}
268 echo "type Uid_t _uid_t" >> ${OUT}
269 echo "type Gid_t _gid_t" >> ${OUT}
270 echo "type Socklen_t _socklen_t" >> ${OUT}
271
272 # The long type, needed because that is the type that ptrace returns.
273 sizeof_long=`grep '^const ___SIZEOF_LONG__ = ' gen-sysinfo.go | sed -e 's/.*= //'`
274 if test "$sizeof_long" = "4"; then
275   echo "type _C_long int32" >> ${OUT}
276 elif test "$sizeof_long" = "8"; then
277   echo "type _C_long int64" >> ${OUT}
278 else
279   echo 1>&2 "mksysinfo.sh: could not determine size of long (got $sizeof_long)"
280   exit 1
281 fi
282
283 # Solaris 2 needs _u?pad128_t, but its default definition in terms of long
284 # double is commented by -fdump-go-spec.
285 if grep "^// type _pad128_t" gen-sysinfo.go > /dev/null 2>&1; then
286   echo "type _pad128_t struct { _l [4]int32; }" >> ${OUT}
287 fi
288 if grep "^// type _upad128_t" gen-sysinfo.go > /dev/null 2>&1; then
289   echo "type _upad128_t struct { _l [4]uint32; }" >> ${OUT}
290 fi
291
292 # The time structures need special handling: we need to name the
293 # types, so that we can cast integers to the right types when
294 # assigning to the structures.
295 timeval=`grep '^type _timeval ' gen-sysinfo.go`
296 timeval_sec=`echo $timeval | sed -n -e 's/^.*tv_sec \([^ ]*\);.*$/\1/p'`
297 timeval_usec=`echo $timeval | sed -n -e 's/^.*tv_usec \([^ ]*\);.*$/\1/p'`
298 echo "type Timeval_sec_t $timeval_sec" >> ${OUT}
299 echo "type Timeval_usec_t $timeval_usec" >> ${OUT}
300 echo $timeval | \
301   sed -e 's/type _timeval /type Timeval /' \
302       -e 's/tv_sec *[a-zA-Z0-9_]*/Sec Timeval_sec_t/' \
303       -e 's/tv_usec *[a-zA-Z0-9_]*/Usec Timeval_usec_t/' >> ${OUT}
304 timespec=`grep '^type _timespec ' gen-sysinfo.go || true`
305 if test "$timespec" = ""; then
306   # IRIX 6.5 has __timespec instead.
307   timespec=`grep '^type ___timespec ' gen-sysinfo.go || true`
308 fi
309 timespec_sec=`echo $timespec | sed -n -e 's/^.*tv_sec \([^ ]*\);.*$/\1/p'`
310 timespec_nsec=`echo $timespec | sed -n -e 's/^.*tv_nsec \([^ ]*\);.*$/\1/p'`
311 echo "type Timespec_sec_t $timespec_sec" >> ${OUT}
312 echo "type Timespec_nsec_t $timespec_nsec" >> ${OUT}
313 echo $timespec | \
314   sed -e 's/^type \(__\)\?_timespec /type Timespec /' \
315       -e 's/tv_sec *[a-zA-Z0-9_]*/Sec Timespec_sec_t/' \
316       -e 's/tv_nsec *[a-zA-Z0-9_]*/Nsec Timespec_nsec_t/' >> ${OUT}
317
318 timestruc=`grep '^type _timestruc_t ' gen-sysinfo.go || true`
319 if test "$timestruc" != ""; then
320   timestruc_sec=`echo $timestruc | sed -n -e 's/^.*tv_sec \([^ ]*\);.*$/\1/p'`
321   timestruc_nsec=`echo $timestruc | sed -n -e 's/^.*tv_nsec \([^ ]*\);.*$/\1/p'`
322   echo "type Timestruc_sec_t $timestruc_sec" >> ${OUT}
323   echo "type Timestruc_nsec_t $timestruc_nsec" >> ${OUT}
324   echo $timestruc | \
325     sed -e 's/^type _timestruc_t /type Timestruc /' \
326         -e 's/tv_sec *[a-zA-Z0-9_]*/Sec Timestruc_sec_t/' \
327         -e 's/tv_nsec *[a-zA-Z0-9_]*/Nsec Timestruc_nsec_t/' >> ${OUT}
328 fi
329
330 # The stat type.
331 # Prefer largefile variant if available.
332 stat=`grep '^type _stat64 ' gen-sysinfo.go || true`
333 if test "$stat" != ""; then
334   grep '^type _stat64 ' gen-sysinfo.go
335 else
336   grep '^type _stat ' gen-sysinfo.go
337 fi | sed -e 's/type _stat\(64\)\?/type Stat_t/' \
338          -e 's/st_dev/Dev/' \
339          -e 's/st_ino/Ino/g' \
340          -e 's/st_nlink/Nlink/' \
341          -e 's/st_mode/Mode/' \
342          -e 's/st_uid/Uid/' \
343          -e 's/st_gid/Gid/' \
344          -e 's/st_rdev/Rdev/' \
345          -e 's/st_size/Size/' \
346          -e 's/st_blksize/Blksize/' \
347          -e 's/st_blocks/Blocks/' \
348          -e 's/st_atim/Atime/' \
349          -e 's/st_mtim/Mtime/' \
350          -e 's/st_ctim/Ctime/' \
351          -e 's/\([^a-zA-Z0-9_]\)_timeval\([^a-zA-Z0-9_]\)/\1Timeval\2/g' \
352          -e 's/\([^a-zA-Z0-9_]\)_timespec\(_t\)\?\([^a-zA-Z0-9_]\)/\1Timespec\3/g' \
353          -e 's/\([^a-zA-Z0-9_]\)_timestruc_t\([^a-zA-Z0-9_]\)/\1Timestruc\2/g' \
354        >> ${OUT}
355
356 # The directory searching types.
357 # Prefer largefile variant if available.
358 dirent=`grep '^type _dirent64 ' gen-sysinfo.go || true`
359 if test "$dirent" != ""; then
360   grep '^type _dirent64 ' gen-sysinfo.go
361 else
362   grep '^type _dirent ' gen-sysinfo.go
363 fi | sed -e 's/type _dirent\(64\)\?/type Dirent/' \
364          -e 's/d_name \[0+1\]/d_name [0+256]/' \
365          -e 's/d_name/Name/' \
366          -e 's/]int8/]byte/' \
367          -e 's/d_ino/Ino/' \
368          -e 's/d_off/Off/' \
369          -e 's/d_reclen/Reclen/' \
370          -e 's/d_type/Type/' \
371       >> ${OUT}
372 echo "type DIR _DIR" >> ${OUT}
373
374 # The rusage struct.
375 rusage=`grep '^type _rusage struct' gen-sysinfo.go`
376 if test "$rusage" != ""; then
377   rusage=`echo $rusage | sed -e 's/type _rusage struct //' -e 's/[{}]//g'`
378   rusage=`echo $rusage | sed -e 's/^ *//'`
379   nrusage=
380   while test -n "$rusage"; do
381     field=`echo $rusage | sed -e 's/^\([^;]*\);.*$/\1/'`
382     rusage=`echo $rusage | sed -e 's/^[^;]*; *\(.*\)$/\1/'`
383     # Drop the leading ru_, capitalize the next character.
384     field=`echo $field | sed -e 's/^ru_//'`
385     f=`echo $field | sed -e 's/^\(.\).*$/\1/'`
386     r=`echo $field | sed -e 's/^.\(.*\)$/\1/'`
387     f=`echo $f | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
388     # Fix _timeval _timespec, and _timestruc_t.
389     r=`echo $r | sed -e s'/ _timeval$/ Timeval/'`
390     r=`echo $r | sed -e s'/ _timespec$/ Timespec/'`
391     r=`echo $r | sed -e s'/ _timestruc_t$/ Timestruc/'`
392     field="$f$r"
393     nrusage="$nrusage $field;"
394   done
395   echo "type Rusage struct {$nrusage }" >> ${OUT}
396 else
397   echo "type Rusage struct {}" >> ${OUT}
398 fi
399
400 # The utsname struct.
401 grep '^type _utsname ' gen-sysinfo.go | \
402     sed -e 's/_utsname/Utsname/' \
403       -e 's/sysname/Sysname/' \
404       -e 's/nodename/Nodename/' \
405       -e 's/release/Release/' \
406       -e 's/version/Version/' \
407       -e 's/machine/Machine/' \
408       -e 's/domainname/Domainname/' \
409     >> ${OUT}
410
411 # The iovec struct.
412 iovec=`grep '^type _iovec ' gen-sysinfo.go`
413 iovec_len=`echo $iovec | sed -n -e 's/^.*iov_len \([^ ]*\);.*$/\1/p'`
414 echo "type Iovec_len_t $iovec_len" >> ${OUT}
415 echo $iovec | \
416     sed -e 's/_iovec/Iovec/' \
417       -e 's/iov_base/Base/' \
418       -e 's/iov_len *[a-zA-Z0-9_]*/Len Iovec_len_t/' \
419     >> ${OUT}
420
421 # The msghdr struct.
422 msghdr=`grep '^type _msghdr ' gen-sysinfo.go`
423 msghdr_controllen=`echo $msghdr | sed -n -e 's/^.*msg_controllen \([^ ]*\);.*$/\1/p'`
424 echo "type Msghdr_controllen_t $msghdr_controllen" >> ${OUT}
425 echo $msghdr | \
426     sed -e 's/_msghdr/Msghdr/' \
427       -e 's/msg_name/Name/' \
428       -e 's/msg_namelen/Namelen/' \
429       -e 's/msg_iov/Iov/' \
430       -e 's/msg_iovlen/Iovlen/' \
431       -e 's/_iovec/Iovec/' \
432       -e 's/msg_control/Control/' \
433       -e 's/msg_controllen *[a-zA-Z0-9_]*/Controllen Msghdr_controllen_t/' \
434       -e 's/msg_flags/Flags/' \
435     >> ${OUT}
436
437 # The ip_mreq struct
438 grep '^type _ip_mreq ' gen-sysinfo.go | \
439     sed -e 's/_ip_mreq/IpMreq/' \
440       -e 's/imr_multiaddr/Multiaddr/' \
441       -e 's/imr_interface/Interface/' \
442       -e 's/_in_addr/[4]byte/g' \
443     >> ${OUT}
444
445 exit $?