github.com/dolotech/hongbao@v0.0.0-20191130105438-fd59d7a5dda5/src/golang.org/x/sys/unix/mkerrors.sh (about)

     1  #!/usr/bin/env bash
     2  # Copyright 2009 The Go Authors. All rights reserved.
     3  # Use of this source code is governed by a BSD-style
     4  # license that can be found in the LICENSE file.
     5  
     6  # Generate Go code listing errors and other #defined constant
     7  # values (ENAMETOOLONG etc.), by asking the preprocessor
     8  # about the definitions.
     9  
    10  unset LANG
    11  export LC_ALL=C
    12  export LC_CTYPE=C
    13  
    14  if test -z "$GOARCH" -o -z "$GOOS"; then
    15  	echo 1>&2 "GOARCH or GOOS not defined in environment"
    16  	exit 1
    17  fi
    18  
    19  # Check that we are using the new build system if we should
    20  if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
    21  	if [[ "$GOLANG_SYS_BUILD" != "docker" ]]; then
    22  		echo 1>&2 "In the new build system, mkerrors should not be called directly."
    23  		echo 1>&2 "See README.md"
    24  		exit 1
    25  	fi
    26  fi
    27  
    28  CC=${CC:-cc}
    29  
    30  if [[ "$GOOS" = "solaris" ]]; then
    31  	# Assumes GNU versions of utilities in PATH.
    32  	export PATH=/usr/gnu/bin:$PATH
    33  fi
    34  
    35  uname=$(uname)
    36  
    37  includes_Darwin='
    38  #define _DARWIN_C_SOURCE
    39  #define KERNEL
    40  #define _DARWIN_USE_64_BIT_INODE
    41  #include <sys/types.h>
    42  #include <sys/event.h>
    43  #include <sys/ptrace.h>
    44  #include <sys/socket.h>
    45  #include <sys/sockio.h>
    46  #include <sys/sysctl.h>
    47  #include <sys/mman.h>
    48  #include <sys/mount.h>
    49  #include <sys/wait.h>
    50  #include <net/bpf.h>
    51  #include <net/if.h>
    52  #include <net/if_types.h>
    53  #include <net/route.h>
    54  #include <netinet/in.h>
    55  #include <netinet/ip.h>
    56  #include <termios.h>
    57  '
    58  
    59  includes_DragonFly='
    60  #include <sys/types.h>
    61  #include <sys/event.h>
    62  #include <sys/socket.h>
    63  #include <sys/sockio.h>
    64  #include <sys/sysctl.h>
    65  #include <sys/mman.h>
    66  #include <sys/wait.h>
    67  #include <sys/ioctl.h>
    68  #include <net/bpf.h>
    69  #include <net/if.h>
    70  #include <net/if_types.h>
    71  #include <net/route.h>
    72  #include <netinet/in.h>
    73  #include <termios.h>
    74  #include <netinet/ip.h>
    75  #include <net/ip_mroute/ip_mroute.h>
    76  '
    77  
    78  includes_FreeBSD='
    79  #include <sys/capability.h>
    80  #include <sys/param.h>
    81  #include <sys/types.h>
    82  #include <sys/event.h>
    83  #include <sys/socket.h>
    84  #include <sys/sockio.h>
    85  #include <sys/sysctl.h>
    86  #include <sys/mman.h>
    87  #include <sys/wait.h>
    88  #include <sys/ioctl.h>
    89  #include <net/bpf.h>
    90  #include <net/if.h>
    91  #include <net/if_types.h>
    92  #include <net/route.h>
    93  #include <netinet/in.h>
    94  #include <termios.h>
    95  #include <netinet/ip.h>
    96  #include <netinet/ip_mroute.h>
    97  #include <sys/extattr.h>
    98  
    99  #if __FreeBSD__ >= 10
   100  #define IFT_CARP	0xf8	// IFT_CARP is deprecated in FreeBSD 10
   101  #undef SIOCAIFADDR
   102  #define SIOCAIFADDR	_IOW(105, 26, struct oifaliasreq)	// ifaliasreq contains if_data
   103  #undef SIOCSIFPHYADDR
   104  #define SIOCSIFPHYADDR	_IOW(105, 70, struct oifaliasreq)	// ifaliasreq contains if_data
   105  #endif
   106  '
   107  
   108  includes_Linux='
   109  #define _LARGEFILE_SOURCE
   110  #define _LARGEFILE64_SOURCE
   111  #ifndef __LP64__
   112  #define _FILE_OFFSET_BITS 64
   113  #endif
   114  #define _GNU_SOURCE
   115  
   116  // <sys/ioctl.h> is broken on powerpc64, as it fails to include definitions of
   117  // these structures. We just include them copied from <bits/termios.h>.
   118  #if defined(__powerpc__)
   119  struct sgttyb {
   120          char    sg_ispeed;
   121          char    sg_ospeed;
   122          char    sg_erase;
   123          char    sg_kill;
   124          short   sg_flags;
   125  };
   126  
   127  struct tchars {
   128          char    t_intrc;
   129          char    t_quitc;
   130          char    t_startc;
   131          char    t_stopc;
   132          char    t_eofc;
   133          char    t_brkc;
   134  };
   135  
   136  struct ltchars {
   137          char    t_suspc;
   138          char    t_dsuspc;
   139          char    t_rprntc;
   140          char    t_flushc;
   141          char    t_werasc;
   142          char    t_lnextc;
   143  };
   144  #endif
   145  
   146  #include <bits/sockaddr.h>
   147  #include <sys/epoll.h>
   148  #include <sys/eventfd.h>
   149  #include <sys/inotify.h>
   150  #include <sys/ioctl.h>
   151  #include <sys/mman.h>
   152  #include <sys/mount.h>
   153  #include <sys/prctl.h>
   154  #include <sys/stat.h>
   155  #include <sys/types.h>
   156  #include <sys/time.h>
   157  #include <sys/socket.h>
   158  #include <sys/xattr.h>
   159  #include <linux/if.h>
   160  #include <linux/if_alg.h>
   161  #include <linux/if_arp.h>
   162  #include <linux/if_ether.h>
   163  #include <linux/if_tun.h>
   164  #include <linux/if_packet.h>
   165  #include <linux/if_addr.h>
   166  #include <linux/falloc.h>
   167  #include <linux/filter.h>
   168  #include <linux/fs.h>
   169  #include <linux/keyctl.h>
   170  #include <linux/netlink.h>
   171  #include <linux/perf_event.h>
   172  #include <linux/random.h>
   173  #include <linux/reboot.h>
   174  #include <linux/rtnetlink.h>
   175  #include <linux/ptrace.h>
   176  #include <linux/sched.h>
   177  #include <linux/seccomp.h>
   178  #include <linux/sockios.h>
   179  #include <linux/wait.h>
   180  #include <linux/icmpv6.h>
   181  #include <linux/serial.h>
   182  #include <linux/can.h>
   183  #include <linux/vm_sockets.h>
   184  #include <linux/taskstats.h>
   185  #include <linux/genetlink.h>
   186  #include <net/route.h>
   187  #include <asm/termbits.h>
   188  
   189  #ifndef MSG_FASTOPEN
   190  #define MSG_FASTOPEN    0x20000000
   191  #endif
   192  
   193  #ifndef PTRACE_GETREGS
   194  #define PTRACE_GETREGS	0xc
   195  #endif
   196  
   197  #ifndef PTRACE_SETREGS
   198  #define PTRACE_SETREGS	0xd
   199  #endif
   200  
   201  #ifndef SOL_NETLINK
   202  #define SOL_NETLINK	270
   203  #endif
   204  
   205  #ifdef SOL_BLUETOOTH
   206  // SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
   207  // but it is already in bluetooth_linux.go
   208  #undef SOL_BLUETOOTH
   209  #endif
   210  
   211  // Certain constants are missing from the fs/crypto UAPI
   212  #define FS_KEY_DESC_PREFIX              "fscrypt:"
   213  #define FS_KEY_DESC_PREFIX_SIZE         8
   214  #define FS_MAX_KEY_SIZE                 64
   215  '
   216  
   217  includes_NetBSD='
   218  #include <sys/types.h>
   219  #include <sys/param.h>
   220  #include <sys/event.h>
   221  #include <sys/mman.h>
   222  #include <sys/socket.h>
   223  #include <sys/sockio.h>
   224  #include <sys/sysctl.h>
   225  #include <sys/termios.h>
   226  #include <sys/ttycom.h>
   227  #include <sys/wait.h>
   228  #include <net/bpf.h>
   229  #include <net/if.h>
   230  #include <net/if_types.h>
   231  #include <net/route.h>
   232  #include <netinet/in.h>
   233  #include <netinet/in_systm.h>
   234  #include <netinet/ip.h>
   235  #include <netinet/ip_mroute.h>
   236  #include <netinet/if_ether.h>
   237  
   238  // Needed since <sys/param.h> refers to it...
   239  #define schedppq 1
   240  '
   241  
   242  includes_OpenBSD='
   243  #include <sys/types.h>
   244  #include <sys/param.h>
   245  #include <sys/event.h>
   246  #include <sys/mman.h>
   247  #include <sys/socket.h>
   248  #include <sys/sockio.h>
   249  #include <sys/sysctl.h>
   250  #include <sys/termios.h>
   251  #include <sys/ttycom.h>
   252  #include <sys/wait.h>
   253  #include <net/bpf.h>
   254  #include <net/if.h>
   255  #include <net/if_types.h>
   256  #include <net/if_var.h>
   257  #include <net/route.h>
   258  #include <netinet/in.h>
   259  #include <netinet/in_systm.h>
   260  #include <netinet/ip.h>
   261  #include <netinet/ip_mroute.h>
   262  #include <netinet/if_ether.h>
   263  #include <net/if_bridge.h>
   264  
   265  // We keep some constants not supported in OpenBSD 5.5 and beyond for
   266  // the promise of compatibility.
   267  #define EMUL_ENABLED		0x1
   268  #define EMUL_NATIVE		0x2
   269  #define IPV6_FAITH		0x1d
   270  #define IPV6_OPTIONS		0x1
   271  #define IPV6_RTHDR_STRICT	0x1
   272  #define IPV6_SOCKOPT_RESERVED1	0x3
   273  #define SIOCGIFGENERIC		0xc020693a
   274  #define SIOCSIFGENERIC		0x80206939
   275  #define WALTSIG			0x4
   276  '
   277  
   278  includes_SunOS='
   279  #include <limits.h>
   280  #include <sys/types.h>
   281  #include <sys/socket.h>
   282  #include <sys/sockio.h>
   283  #include <sys/mman.h>
   284  #include <sys/wait.h>
   285  #include <sys/ioctl.h>
   286  #include <sys/mkdev.h>
   287  #include <net/bpf.h>
   288  #include <net/if.h>
   289  #include <net/if_arp.h>
   290  #include <net/if_types.h>
   291  #include <net/route.h>
   292  #include <netinet/in.h>
   293  #include <termios.h>
   294  #include <netinet/ip.h>
   295  #include <netinet/ip_mroute.h>
   296  '
   297  
   298  
   299  includes='
   300  #include <sys/types.h>
   301  #include <sys/file.h>
   302  #include <fcntl.h>
   303  #include <dirent.h>
   304  #include <sys/socket.h>
   305  #include <netinet/in.h>
   306  #include <netinet/ip.h>
   307  #include <netinet/ip6.h>
   308  #include <netinet/tcp.h>
   309  #include <errno.h>
   310  #include <sys/signal.h>
   311  #include <signal.h>
   312  #include <sys/resource.h>
   313  #include <time.h>
   314  '
   315  ccflags="$@"
   316  
   317  # Write go tool cgo -godefs input.
   318  (
   319  	echo package unix
   320  	echo
   321  	echo '/*'
   322  	indirect="includes_$(uname)"
   323  	echo "${!indirect} $includes"
   324  	echo '*/'
   325  	echo 'import "C"'
   326  	echo 'import "syscall"'
   327  	echo
   328  	echo 'const ('
   329  
   330  	# The gcc command line prints all the #defines
   331  	# it encounters while processing the input
   332  	echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags |
   333  	awk '
   334  		$1 != "#define" || $2 ~ /\(/ || $3 == "" {next}
   335  
   336  		$2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next}  # 386 registers
   337  		$2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next}
   338  		$2 ~ /^(SCM_SRCRT)$/ {next}
   339  		$2 ~ /^(MAP_FAILED)$/ {next}
   340  		$2 ~ /^ELF_.*$/ {next}# <asm/elf.h> contains ELF_ARCH, etc.
   341  
   342  		$2 ~ /^EXTATTR_NAMESPACE_NAMES/ ||
   343  		$2 ~ /^EXTATTR_NAMESPACE_[A-Z]+_STRING/ {next}
   344  
   345  		$2 !~ /^ETH_/ &&
   346  		$2 !~ /^EPROC_/ &&
   347  		$2 !~ /^EQUIV_/ &&
   348  		$2 !~ /^EXPR_/ &&
   349  		$2 ~ /^E[A-Z0-9_]+$/ ||
   350  		$2 ~ /^B[0-9_]+$/ ||
   351  		$2 ~ /^(OLD|NEW)DEV$/ ||
   352  		$2 == "BOTHER" ||
   353  		$2 ~ /^CI?BAUD(EX)?$/ ||
   354  		$2 == "IBSHIFT" ||
   355  		$2 ~ /^V[A-Z0-9]+$/ ||
   356  		$2 ~ /^CS[A-Z0-9]/ ||
   357  		$2 ~ /^I(SIG|CANON|CRNL|UCLC|EXTEN|MAXBEL|STRIP|UTF8)$/ ||
   358  		$2 ~ /^IGN/ ||
   359  		$2 ~ /^IX(ON|ANY|OFF)$/ ||
   360  		$2 ~ /^IN(LCR|PCK)$/ ||
   361  		$2 ~ /(^FLU?SH)|(FLU?SH$)/ ||
   362  		$2 ~ /^C(LOCAL|READ|MSPAR|RTSCTS)$/ ||
   363  		$2 == "BRKINT" ||
   364  		$2 == "HUPCL" ||
   365  		$2 == "PENDIN" ||
   366  		$2 == "TOSTOP" ||
   367  		$2 == "XCASE" ||
   368  		$2 == "ALTWERASE" ||
   369  		$2 == "NOKERNINFO" ||
   370  		$2 ~ /^PAR/ ||
   371  		$2 ~ /^SIG[^_]/ ||
   372  		$2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ ||
   373  		$2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ ||
   374  		$2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ ||
   375  		$2 ~ /^O?XTABS$/ ||
   376  		$2 ~ /^TC[IO](ON|OFF)$/ ||
   377  		$2 ~ /^IN_/ ||
   378  		$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
   379  		$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
   380  		$2 ~ /^FALLOC_/ ||
   381  		$2 == "ICMPV6_FILTER" ||
   382  		$2 == "SOMAXCONN" ||
   383  		$2 == "NAME_MAX" ||
   384  		$2 == "IFNAMSIZ" ||
   385  		$2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||
   386  		$2 ~ /^SYSCTL_VERS/ ||
   387  		$2 ~ /^(MS|MNT|UMOUNT)_/ ||
   388  		$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
   389  		$2 ~ /^(O|F|E?FD|NAME|S|PTRACE|PT)_/ ||
   390  		$2 ~ /^LINUX_REBOOT_CMD_/ ||
   391  		$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
   392  		$2 !~ "NLA_TYPE_MASK" &&
   393  		$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ ||
   394  		$2 ~ /^SIOC/ ||
   395  		$2 ~ /^TIOC/ ||
   396  		$2 ~ /^TCGET/ ||
   397  		$2 ~ /^TCSET/ ||
   398  		$2 ~ /^TC(FLSH|SBRKP?|XONC)$/ ||
   399  		$2 !~ "RTF_BITS" &&
   400  		$2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
   401  		$2 ~ /^BIOC/ ||
   402  		$2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
   403  		$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ ||
   404  		$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
   405  		$2 ~ /^CLONE_[A-Z_]+/ ||
   406  		$2 !~ /^(BPF_TIMEVAL)$/ &&
   407  		$2 ~ /^(BPF|DLT)_/ ||
   408  		$2 ~ /^CLOCK_/ ||
   409  		$2 ~ /^CAN_/ ||
   410  		$2 ~ /^CAP_/ ||
   411  		$2 ~ /^ALG_/ ||
   412  		$2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ ||
   413  		$2 ~ /^GRND_/ ||
   414  		$2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ ||
   415  		$2 ~ /^KEYCTL_/ ||
   416  		$2 ~ /^PERF_EVENT_IOC_/ ||
   417  		$2 ~ /^SECCOMP_MODE_/ ||
   418  		$2 ~ /^SPLICE_/ ||
   419  		$2 ~ /^(VM|VMADDR)_/ ||
   420  		$2 ~ /^(TASKSTATS|TS)_/ ||
   421  		$2 ~ /^GENL_/ ||
   422  		$2 ~ /^XATTR_(CREATE|REPLACE)/ ||
   423  		$2 !~ "WMESGLEN" &&
   424  		$2 ~ /^W[A-Z0-9]+$/ ||
   425  		$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
   426  		$2 ~ /^__WCOREFLAG$/ {next}
   427  		$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
   428  
   429  		{next}
   430  	' | sort
   431  
   432  	echo ')'
   433  ) >_const.go
   434  
   435  # Pull out the error names for later.
   436  errors=$(
   437  	echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
   438  	awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' |
   439  	sort
   440  )
   441  
   442  # Pull out the signal names for later.
   443  signals=$(
   444  	echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
   445  	awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
   446  	egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
   447  	sort
   448  )
   449  
   450  # Again, writing regexps to a file.
   451  echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
   452  	awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' |
   453  	sort >_error.grep
   454  echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
   455  	awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
   456  	egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
   457  	sort >_signal.grep
   458  
   459  echo '// mkerrors.sh' "$@"
   460  echo '// Code generated by the command above; see README.md. DO NOT EDIT.'
   461  echo
   462  echo "// +build ${GOARCH},${GOOS}"
   463  echo
   464  go tool cgo -godefs -- "$@" _const.go >_error.out
   465  cat _error.out | grep -vf _error.grep | grep -vf _signal.grep
   466  echo
   467  echo '// Errors'
   468  echo 'const ('
   469  cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= syscall.Errno(\1)/'
   470  echo ')'
   471  
   472  echo
   473  echo '// Signals'
   474  echo 'const ('
   475  cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= syscall.Signal(\1)/'
   476  echo ')'
   477  
   478  # Run C program to print error and syscall strings.
   479  (
   480  	echo -E "
   481  #include <stdio.h>
   482  #include <stdlib.h>
   483  #include <errno.h>
   484  #include <ctype.h>
   485  #include <string.h>
   486  #include <signal.h>
   487  
   488  #define nelem(x) (sizeof(x)/sizeof((x)[0]))
   489  
   490  enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below
   491  
   492  int errors[] = {
   493  "
   494  	for i in $errors
   495  	do
   496  		echo -E '	'$i,
   497  	done
   498  
   499  	echo -E "
   500  };
   501  
   502  int signals[] = {
   503  "
   504  	for i in $signals
   505  	do
   506  		echo -E '	'$i,
   507  	done
   508  
   509  	# Use -E because on some systems bash builtin interprets \n itself.
   510  	echo -E '
   511  };
   512  
   513  static int
   514  intcmp(const void *a, const void *b)
   515  {
   516  	return *(int*)a - *(int*)b;
   517  }
   518  
   519  int
   520  main(void)
   521  {
   522  	int i, e;
   523  	char buf[1024], *p;
   524  
   525  	printf("\n\n// Error table\n");
   526  	printf("var errors = [...]string {\n");
   527  	qsort(errors, nelem(errors), sizeof errors[0], intcmp);
   528  	for(i=0; i<nelem(errors); i++) {
   529  		e = errors[i];
   530  		if(i > 0 && errors[i-1] == e)
   531  			continue;
   532  		strcpy(buf, strerror(e));
   533  		// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
   534  		if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
   535  			buf[0] += a - A;
   536  		printf("\t%d: \"%s\",\n", e, buf);
   537  	}
   538  	printf("}\n\n");
   539  
   540  	printf("\n\n// Signal table\n");
   541  	printf("var signals = [...]string {\n");
   542  	qsort(signals, nelem(signals), sizeof signals[0], intcmp);
   543  	for(i=0; i<nelem(signals); i++) {
   544  		e = signals[i];
   545  		if(i > 0 && signals[i-1] == e)
   546  			continue;
   547  		strcpy(buf, strsignal(e));
   548  		// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
   549  		if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
   550  			buf[0] += a - A;
   551  		// cut trailing : number.
   552  		p = strrchr(buf, ":"[0]);
   553  		if(p)
   554  			*p = '\0';
   555  		printf("\t%d: \"%s\",\n", e, buf);
   556  	}
   557  	printf("}\n\n");
   558  
   559  	return 0;
   560  }
   561  
   562  '
   563  ) >_errors.c
   564  
   565  $CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out