Lines Matching refs:status

45 Syscall_Exit(uint64_t status)
54 cur->proc->exitCode = status;
70 int status;
79 status = Copy_StrIn(user_path, &path, sizeof(path));
80 if (status != 0)
81 return SYSCALL_PACK(status, 0);
94 status = Copy_In(user_argv+off, arg+sizeof(uintptr_t)*(1+i), sizeof(uintptr_t));
95 if (status != 0) {
97 return SYSCALL_PACK(status, 0);
111 status = Copy_StrIn(*str, argstart, 256); // XXX: Make sure there's no overrun
112 if (status != 0) {
114 return SYSCALL_PACK(status, 0);
168 uint64_t status;
171 status = Process_Wait(cur->proc, pid);
174 return status;
181 bool status;
183 status = PMap_AllocMap(cur->space, addr, len, PTE_W);
185 if (!status) {
221 uint64_t status;
226 status = -EBADF;
228 status = (handle->read)(handle, (void *)addr, off, length);
233 return status;
239 uint64_t status;
244 status = -EBADF;
246 status = (handle->write)(handle, (void *)addr, off, length);
251 return status;
257 uint64_t status;
262 status = -EBADF;
264 status = (handle->flush)(handle);
269 return status;
280 int status;
283 status = Copy_StrIn(user_path, &path, sizeof(path));
284 if (status != 0) {
286 return status;
302 status = VFSUIO_Open(path, &handle);
303 if (status != 0) {
305 return status;
316 uint64_t status;
321 status = -EBADF;
323 status = (handle->close)(handle);
328 return status;
334 int status;
338 status = Copy_StrIn(user_path, &path, sizeof(path));
339 if (status != 0) {
340 return status;
344 status = VFS_Stat(path, &sb);
345 if (status != 0) {
346 return status;
349 status = Copy_Out(&sb, user_stat, sizeof(struct stat));
350 if (status != 0) {
351 return status;
360 int status, rstatus;
370 status = Copy_In(user_off, &offset, sizeof(offset));
371 if (status != 0) {
373 return status;
387 status = Copy_Out(&offset, user_off, sizeof(offset));
388 if (status != 0) {
390 return status;
428 Syscall_ThreadExit(uint64_t status)
433 cur->exitValue = status;
482 uint64_t status;
496 status = Thread_Wait(cur, tid);
497 if (SYSCALL_ERRCODE(status) != EAGAIN) {
499 return status;
509 int status;
517 status = Copy_Out(nic, user_stat, sizeof(NIC));
518 if (status != 0) {
519 return status;
528 int status;
532 status = Copy_In(user_mbuf, &mbuf, sizeof(mbuf));
533 if (status != 0) {
534 return SYSCALL_PACK(status, 0);
552 int status;
556 status = Copy_In(user_mbuf, &mbuf, sizeof(mbuf));
557 if (status != 0) {
558 return SYSCALL_PACK(status, 0);
576 uint64_t status;
579 status = Copy_StrIn(user_node, &node, sizeof(node));
580 if (status != 0) {
581 return SYSCALL_PACK(status, 0);
593 status = Copy_Out(scStr, user_oldval, sizeof(*scStr));
598 status = Copy_Out(scInt, user_oldval, sizeof(*scInt));
603 status = Copy_Out(scBool, user_oldval, sizeof(scBool));
607 status = EINVAL;
611 if (status != 0) {
612 return SYSCALL_PACK(status, 0);
620 status = Copy_In(user_newval, &scStr, sizeof(scStr));
621 if (status != 0) {
622 return SYSCALL_PACK(status, 0);
624 status = SysCtl_SetObject(node, (void *)&scStr);
629 status = Copy_In(user_newval, &scInt, sizeof(scInt));
630 if (status != 0) {
631 return SYSCALL_PACK(status, 0);
633 status = SysCtl_SetObject(node, (void *)&scInt);
638 status = Copy_In(user_newval, &scBool, sizeof(scBool));
639 if (status != 0) {
640 return SYSCALL_PACK(status, 0);
642 status = SysCtl_SetObject(node, (void *)&scBool);
646 status = EINVAL;
651 return SYSCALL_PACK(status, 0);