2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <afsconfig.h>
11 #include <afs/param.h>
15 #include <afs/afs_args.h>
17 #include <sys/ioctl.h>
18 #include <sys/socket.h>
22 #include <netinet/in.h>
33 #include <afs/venus.h>
39 static char space[MAXSIZE];
46 struct ViceIoctl blob;
52 * The following signal action for AIX is necessary so that in case of a
53 * crash (i.e. core is generated) we can include the user's data section
54 * in the core dump. Unfortunately, by default, only a partial core is
55 * generated which, in many cases, isn't too useful.
59 sigemptyset(&nsa.sa_mask);
60 nsa.sa_handler = SIG_DFL;
61 nsa.sa_flags = SA_FULLDUMP;
62 sigaction(SIGSEGV, &nsa, NULL);
67 blob.out_size = MAXSIZE;
68 blob.in_size = sizeof(afs_int32);
69 memcpy(space, &setp, sizeof(afs_int32));
70 code = pioctl(0, VIOC_AFS_SYSNAME, &blob, 1);
72 fprintf(stderr, "livesys: %s\n", error_message(code));
76 memcpy(&setp, input, sizeof(afs_int32));
77 input += sizeof(afs_int32);
79 fprintf(stderr, "No sysname name value was found\n");
82 printf("%s\n", input);