Changeset 9fd39d6 in mainline for uspace/app/netstart/netstart.c
- Timestamp:
- 2010-11-07T19:15:39Z (13 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/netstart/netstart.c
r68f0c3a r9fd39d6 41 41 #include <task.h> 42 42 #include <str_error.h> 43 #include <err.h>44 43 #include <ipc/ipc.h> 45 44 #include <ipc/services.h> … … 57 56 static bool spawn(const char *desc, const char *path) 58 57 { 58 int rc; 59 59 60 printf("%s: Spawning %s (%s)\n", NAME, desc, path); 60 61 const char *argv[2]; 62 63 argv[0] = path; 64 argv[1] = NULL; 65 66 int err; 67 if (task_spawn(path, argv, &err) == 0) { 61 rc = task_spawnl(NULL, path, path, NULL); 62 if (rc != EOK) { 68 63 fprintf(stderr, "%s: Error spawning %s (%s)\n", NAME, path, 69 str_error( err));64 str_error(rc)); 70 65 return false; 71 66 } … … 76 71 int main(int argc, char *argv[]) 77 72 { 78 ERROR_DECLARE;73 int rc; 79 74 80 75 if (!spawn("networking service", "/srv/net")) … … 84 79 85 80 int net_phone = connect_to_service(SERVICE_NETWORKING); 86 if (ERROR_OCCURRED(ipc_call_sync_0_0(net_phone, NET_NET_STARTUP))) { 87 fprintf(stderr, "%s: Startup error %d\n", NAME, ERROR_CODE); 88 return ERROR_CODE; 81 rc = ipc_call_sync_0_0(net_phone, NET_NET_STARTUP); 82 if (rc != EOK) { 83 fprintf(stderr, "%s: Startup error %d\n", NAME, rc); 84 return rc; 89 85 } 90 86
Note:
See TracChangeset
for help on using the changeset viewer.