Changeset 9fd39d6 in mainline for uspace/srv
- Timestamp:
- 2010-11-07T19:15:39Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 16ac756
- Parents:
- 68f0c3a (diff), 3da12d74 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace/srv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devman.c
r68f0c3a r9fd39d6 37 37 #include <ipc/devman.h> 38 38 #include <devmap.h> 39 #include <str_error.h> 39 40 40 41 #include "devman.h" … … 446 447 bool start_driver(driver_t *drv) 447 448 { 449 int rc; 450 448 451 printf(NAME ": start_driver '%s'\n", drv->name); 449 452 450 const char *argv[2]; 451 452 argv[0] = drv->name; 453 argv[1] = NULL; 454 455 int err; 456 if (task_spawn(drv->binary_path, argv, &err) == 0) { 457 printf(NAME ": error spawning %s, errno = %d\n", 458 drv->name, err); 453 rc = task_spawnl(NULL, drv->binary_path, drv->binary_path, NULL); 454 if (rc != EOK) { 455 printf(NAME ": error spawning %s (%s)\n", 456 drv->name, str_error(rc)); 459 457 return false; 460 458 } -
uspace/srv/taskmon/taskmon.c
r68f0c3a r9fd39d6 50 50 static void fault_event(ipc_callid_t callid, ipc_call_t *call) 51 51 { 52 const char *argv[6];53 52 const char *fname; 54 char *dump_fname;55 53 char *s_taskid; 56 const char **s;54 int rc; 57 55 58 56 task_id_t taskid; … … 67 65 } 68 66 67 printf(NAME ": Task %" PRIuTASKID " fault in thread %p.\n", taskid, thread); 68 69 fname = "/app/taskdump"; 70 71 #ifdef CONFIG_WRITE_CORE_FILES 72 char *dump_fname; 73 69 74 if (asprintf(&dump_fname, "/data/core%" PRIuTASKID, taskid) < 0) { 70 75 printf("Memory allocation failed.\n"); … … 72 77 } 73 78 74 printf(NAME ": Task %" PRIuTASKID " fault in thread %p.\n", taskid, thread); 75 76 #ifdef CONFIG_WRITE_CORE_FILES 77 argv[0] = "/app/taskdump"; 78 argv[1] = "-c"; 79 argv[2] = dump_fname; 80 argv[3] = "-t"; 81 argv[4] = s_taskid; 82 argv[5] = NULL; 79 printf(NAME ": Executing %s -c %s -t %s\n", dump_fname, s_taskid); 80 rc = task_spawnl(NULL, fname, fname, "-c", dump_fname, "-t", s_taskid, 81 NULL); 83 82 #else 84 argv[0] = "/app/taskdump"; 85 argv[1] = "-t"; 86 argv[2] = s_taskid; 87 argv[3] = NULL; 83 printf(NAME ": Executing %s -t %s\n", s_taskid); 84 rc = task_spawnl(NULL, fname, fname, "-t", s_taskid, NULL); 88 85 #endif 89 fname = argv[0]; 90 91 printf(NAME ": Executing"); 92 93 s = argv; 94 while (*s != NULL) { 95 printf(" %s", *s); 96 ++s; 86 if (rc != EOK) { 87 printf("%s: Error spawning %s (%s).\n", NAME, fname, 88 str_error(rc)); 97 89 } 98 putchar('\n');99 100 int err;101 if (!task_spawn(fname, argv, &err))102 printf("%s: Error spawning %s (%s).\n", NAME, fname,103 str_error(err));104 90 } 105 91
Note:
See TracChangeset
for help on using the changeset viewer.