| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | #include <afsconfig.h> |
| 11 | #include <afs/param.h> |
| 12 | #include <stdio.h> |
| 13 | #include <stdlib.h> |
| 14 | #include <ctype.h> |
| 15 | #include <string.h> |
| 16 | #ifdef HAVE_UNISTD_H1 |
| 17 | #include <unistd.h> |
| 18 | #endif |
| 19 | #ifdef HAVE_STDINT_H1 |
| 20 | # include <stdint.h> |
| 21 | #endif |
| 22 | |
| 23 | |
| 24 | #include <afs/afs_args.h> |
| 25 | |
| 26 | #include "AFS_component_version_number.c" |
| 27 | |
| 28 | int |
| 29 | main(int argc, char **argv) |
| 30 | { |
| 31 | afs_int32 code; |
| 32 | int i, counter; |
| 33 | afs_int32 parms[6]; |
| 34 | int numberFlag; |
| 35 | |
| 36 | if (argc < 2) { |
| |
| 37 | printf("use: vsys <call number> <parms>\n"); |
| 38 | exit(1); |
| 39 | } |
| 40 | numberFlag = 1; |
| 41 | counter = 0; |
| 42 | for (i = 1; i < argc; i++) { |
| 2 | Loop condition is true. Entering loop body |
|
| 5 | Loop condition is true. Entering loop body |
|
| 8 | Loop condition is false. Execution continues on line 59 |
|
| 43 | if (numberFlag && argv[i][0] == '-') { |
| |
| |
| 44 | if (strcmp(argv[i], "-s") == 0) |
| 45 | numberFlag = 0; |
| 46 | else { |
| 47 | printf("bad switch %s\n", argv[i]); |
| 48 | exit(1); |
| 49 | } |
| 50 | } else if (numberFlag) { |
| |
| |
| 51 | parms[counter++] = atoi(argv[i]); |
| 52 | numberFlag = 1; |
| 53 | } else { |
| 54 | parms[counter++] = (intptr_t)argv[i]; |
| 55 | numberFlag = 1; |
| 56 | } |
| 57 | } |
| 58 | code = |
| 59 | syscall(AFS_SYSCALL339, parms[0], parms[1], parms[2], parms[3], parms[4], |
| 9 | Function call argument is an uninitialized value |
|
| 60 | parms[5]); |
| 61 | printf("code %d\n", code); |
| 62 | return 0; |
| 63 | } |