Upload Tizen:Base source
[framework/base/util-linux-ng.git] / sys-utils / arch.c
1 /* arch -- print machine architecture information
2  * Created: Mon Dec 20 12:27:15 1993 by faith@cs.unc.edu
3  * Revised: Mon Dec 20 12:29:23 1993 by faith@cs.unc.edu
4  * Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
5
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the
8  * Free Software Foundation; either version 2, or (at your option) any
9  * later version.
10
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 675 Mass Ave, Cambridge, MA 02139, USA.  */
19
20 #include <stdio.h>
21 #include <sys/utsname.h>
22
23 int main (void)
24 {
25   struct utsname utsbuf;
26
27   if (uname( &utsbuf )) {
28      perror( "arch" );
29      return 1;
30   }
31
32   printf( "%s\n", utsbuf.machine );
33
34   return 0;
35 }