Changeset d52b0044 in mainline
- Timestamp:
- 2010-11-14T16:16:11Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4deb8b5
- Parents:
- 9e2e715
- Location:
- uspace/app/getterm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/getterm/getterm.c
r9e2e715 rd52b0044 48 48 static void usage(void) 49 49 { 50 printf("Usage: %s <terminal> < path>\n", APP_NAME);50 printf("Usage: %s <terminal> <command> [<arguments...>]\n", APP_NAME); 51 51 } 52 52 … … 73 73 } 74 74 75 static task_id_t spawn(const char *fname)76 {77 task_id_t id;78 int rc;79 80 rc = task_spawnl(&id, fname, fname, NULL);81 if (rc != EOK) {82 printf("%s: Error spawning %s (%s)\n", APP_NAME, fname,83 str_error(rc));84 return 0;85 }86 87 return id;88 }89 90 75 int main(int argc, char *argv[]) 91 76 { 77 int rc; 78 task_exit_t texit; 79 int retval; 80 task_id_t id; 81 char *fname; 82 92 83 if (argc < 3) { 93 84 usage(); … … 115 106 116 107 version_print(argv[1]); 117 task_id_t id = spawn(argv[2]);108 fname = argv[2]; 118 109 119 if (id != 0) { 120 task_exit_t texit; 121 int retval; 122 task_wait(id, &texit, &retval); 123 124 return 0; 110 rc = task_spawnv(&id, fname, (const char * const *) &argv[2]); 111 if (rc != EOK) { 112 printf("%s: Error spawning %s (%s)\n", APP_NAME, fname, 113 str_error(rc)); 114 return -5; 125 115 } 126 127 return -5; 116 117 rc = task_wait(id, &texit, &retval); 118 if (rc != EOK) { 119 printf("%s: Error waiting for %s (%s)\n", APP_NAME, fname, 120 str_error(rc)); 121 return -6; 122 } 123 124 return 0; 128 125 } 129 126 -
uspace/app/getterm/version.c
r9e2e715 rd52b0044 61 61 printf("HelenOS release %s (%s)%s%s\n", release, name, revision, timestamp); 62 62 printf("Running on %s (%s)\n", arch, term); 63 printf("Copyright (c) 2001-20 09HelenOS project\n\n");63 printf("Copyright (c) 2001-2010 HelenOS project\n\n"); 64 64 } 65 65
Note:
See TracChangeset
for help on using the changeset viewer.