Changeset bad8d41 in mainline
- Timestamp:
- 2017-12-21T20:24:54Z (7 years ago)
- Parents:
- f04b5b3
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-21 18:24:59)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-21 20:24:54)
- Location:
- uspace
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cmp/cmp.c
rf04b5b3 rbad8d41 101 101 memcmp(buffer[0], buffer[1], offset[0]) != 0) { 102 102 printf("Return 1\n"); 103 rc = 1;103 rc = EBUSY; 104 104 goto end; 105 105 } -
uspace/app/bdsh/cmds/modules/cp/cp.c
rf04b5b3 rbad8d41 266 266 267 267 /* call copy_file and exit */ 268 rc = (copy_file(src, dest_path, blen, vb) < 0); 268 if (copy_file(src, dest_path, blen, vb) < 0) { 269 rc = EIO; 270 } 269 271 270 272 } else if (src_type == TYPE_DIR) { … … 434 436 if (rc != EOK) { 435 437 printf("\nError copying %s: %s\n", src, str_error(rc)); 436 return rc;438 return -1; 437 439 } 438 440 … … 442 444 if (buff) 443 445 free(buff); 444 return rc; 446 if (rc != EOK) { 447 return -1; 448 } else { 449 return 0; 450 } 445 451 } 446 452 … … 473 479 int force = 0, interactive = 0; 474 480 int c, opt_ind; 475 int 64_tret;481 int ret; 476 482 477 483 con = console_init(stdin, stdout); -
uspace/app/bdsh/input.c
rf04b5b3 rbad8d41 73 73 74 74 char *cmd[WORD_MAX]; 75 int rc = 0;75 int rc = EOK; 76 76 tokenizer_t tok; 77 77 unsigned int i, pipe_count, processed_pipes; … … 82 82 if (usr->line == NULL) { 83 83 free(tokens_buf); 84 return CL_EFAIL;84 return EINVAL; 85 85 } 86 86 … … 198 198 } 199 199 200 rc = run_command(cmd, usr, &new_iostate); 200 if (run_command(cmd, usr, &new_iostate) == 0) { 201 rc = EOK; 202 } else { 203 rc = EINVAL; 204 } 201 205 202 206 finit_with_files: -
uspace/app/fontviewer/fontviewer.c
rf04b5b3 rbad8d41 149 149 va_end(args); 150 150 151 if (ret <= 0) 152 return ret; 153 154 drawctx_set_source(drawctx, source); 155 drawctx_set_font(drawctx, font); 156 drawctx_print(drawctx, str, x, y); 157 158 free(str); 151 if (ret >= 0) { 152 drawctx_set_source(drawctx, source); 153 drawctx_set_font(drawctx, font); 154 drawctx_print(drawctx, str, x, y); 155 156 free(str); 157 } 159 158 160 159 return ret; -
uspace/app/init/init.c
rf04b5b3 rbad8d41 208 208 path, retval); 209 209 210 return retval ;210 return retval == 0 ? EOK : EPARTY; 211 211 } 212 212 -
uspace/app/pkg/pkg.c
rf04b5b3 rbad8d41 96 96 } 97 97 98 return retval ;98 return retval == 0 ? EOK : EPARTY; 99 99 } 100 100 -
uspace/app/trace/ipcp.c
rf04b5b3 rbad8d41 281 281 if (oper->rv_type != V_VOID) { 282 282 putchar(' '); 283 val_print( retval, oper->rv_type);283 val_print((sysarg_t) retval, oper->rv_type); 284 284 } 285 285 -
uspace/app/trace/trace.c
rf04b5b3 rbad8d41 260 260 261 261 262 static void print_sc_retval( int retval, val_type_t val_type)262 static void print_sc_retval(sysarg_t retval, val_type_t val_type) 263 263 { 264 264 printf(" -> "); … … 296 296 IPC_SET_ARG5(call, 0); 297 297 298 ipcp_call_out(phoneid, &call, sc_rc);299 } 300 301 static void sc_ipc_call_async_slow(sysarg_t *sc_args, sysarg_t sc_rc)298 ipcp_call_out(phoneid, &call, 0); 299 } 300 301 static void sc_ipc_call_async_slow(sysarg_t *sc_args, int sc_rc) 302 302 { 303 303 ipc_call_t call; 304 304 int rc; 305 305 306 if (sc_rc != (sysarg_t)EOK)306 if (sc_rc != EOK) 307 307 return; 308 308 … … 310 310 rc = udebug_mem_read(sess, &call.args, sc_args[1], sizeof(call.args)); 311 311 312 if (rc >= 0) {313 ipcp_call_out(sc_args[0], &call, sc_rc);312 if (rc == EOK) { 313 ipcp_call_out(sc_args[0], &call, 0); 314 314 } 315 315 } … … 581 581 582 582 if (!console_get_event(console, &event)) 583 return -1;583 return EINVAL; 584 584 585 585 if (event.type == CEV_KEY) { -
uspace/drv/platform/msim/msim.c
rf04b5b3 rbad8d41 156 156 /* Nothing to do. */ 157 157 158 return true;158 return EOK; 159 159 } 160 160 -
uspace/drv/platform/sun4v/sun4v.c
rf04b5b3 rbad8d41 116 116 static int sun4v_enable_interrupt(ddf_fun_t *fun, int irq) 117 117 { 118 return true;118 return EOK; 119 119 } 120 120 -
uspace/lib/c/include/io/klog.h
rf04b5b3 rbad8d41 49 49 #define KLOG_PRINTF(lvl, fmt, ...) ({ \ 50 50 char *_s; \ 51 int _ c = asprintf(&_s, fmt, ##__VA_ARGS__); \52 if ( _c>= 0) { \53 _ c = klog_write((lvl), _s, str_size(_s)); \51 int _rc = ENOMEM; \ 52 if (asprintf(&_s, fmt, ##__VA_ARGS__) >= 0) { \ 53 _rc = klog_write((lvl), _s, str_size(_s)); \ 54 54 free(_s); \ 55 55 }; \ 56 (_ c >= 0); \56 (_rc != EOK); \ 57 57 }) 58 58 -
uspace/lib/http/src/request.c
rf04b5b3 rbad8d41 96 96 ssize_t meth_size = http_encode_method(NULL, 0, req->method, req->path); 97 97 if (meth_size < 0) 98 return meth_size;98 return EINVAL; 99 99 size_t size = meth_size; 100 100 … … 102 102 ssize_t header_size = http_header_encode(header, NULL, 0); 103 103 if (header_size < 0) 104 return header_size;104 return EINVAL; 105 105 size += header_size; 106 106 } … … 116 116 if (written < 0) { 117 117 free(buf); 118 return written;118 return EINVAL; 119 119 } 120 120 pos += written; … … 125 125 if (written < 0) { 126 126 free(buf); 127 return written;127 return EINVAL; 128 128 } 129 129 pos += written; -
uspace/lib/usbdev/src/recognise.c
rf04b5b3 rbad8d41 88 88 char *str = NULL; \ 89 89 int __rc = asprintf(&str, format, ##__VA_ARGS__); \ 90 if (__rc > 0) { \ 91 __rc = usb_add_match_id((match_ids), (score), str); \ 92 } \ 93 if (__rc != EOK) { \ 94 free(str); \ 95 return __rc; \ 90 if (__rc >= 0) { \ 91 int __rc = usb_add_match_id((match_ids), (score), str); \ 92 if (__rc != EOK) { \ 93 free(str); \ 94 return __rc; \ 95 } \ 96 } else { \ 97 return ENOMEM; \ 96 98 } \ 97 99 } while (0) -
uspace/srv/devman/devtree.c
rf04b5b3 rbad8d41 198 198 dev_node_t *rdev = tree->root_node->child; 199 199 dev_add_ref(rdev); 200 intrc = assign_driver(rdev, drivers_list, tree);200 bool rc = assign_driver(rdev, drivers_list, tree); 201 201 dev_del_ref(rdev); 202 202 -
uspace/srv/fs/mfs/mfs.c
rf04b5b3 rbad8d41 68 68 else { 69 69 printf(NAME " Unrecognized parameters"); 70 rc = -1;70 rc = EINVAL; 71 71 goto err; 72 72 } … … 78 78 if (!vfs_sess) { 79 79 printf(NAME ": failed to connect to VFS\n"); 80 return -1; 80 rc = errno; 81 goto err; 81 82 } 82 83 -
uspace/srv/fs/mfs/mfs_balloc.c
rf04b5b3 rbad8d41 246 246 printf(NAME ": Error! Trying to free beyond the " 247 247 "bitmap max size\n"); 248 return -1;248 return EIO; 249 249 } 250 250 } else { … … 254 254 printf(NAME ": Error! Trying to free beyond the " 255 255 "bitmap max size\n"); 256 return -1;256 return EIO; 257 257 } 258 258 } … … 303 303 unsigned *search, i, start_block; 304 304 unsigned bits_per_block; 305 int r, freebit; 305 int r; 306 int freebit; 306 307 307 308 sbi = inst->sbi; -
uspace/srv/hid/input/ctl/stty.c
rf04b5b3 rbad8d41 243 243 244 244 gsp_init(&sp); 245 return gsp_insert_defs(&sp, seq_defs); 245 if (gsp_insert_defs(&sp, seq_defs) < 0) { 246 return EINVAL; 247 } 248 return EOK; 246 249 } 247 250 -
uspace/srv/hid/rfb/rfb.c
rf04b5b3 rbad8d41 435 435 } 436 436 437 static size_t rfb_tile_encode_solid(rfb_t *rfb, cpixel_ctx_t *cpixel,437 static int rfb_tile_encode_solid(rfb_t *rfb, cpixel_ctx_t *cpixel, 438 438 rfb_rectangle_t *tile, void *buf, size_t *size) 439 439 { -
uspace/srv/loader/main.c
rf04b5b3 rbad8d41 300 300 pcb.inbox_entries = inbox_entries; 301 301 302 async_answer_0(rid, rc);302 async_answer_0(rid, EOK); 303 303 return 0; 304 304 } -
uspace/srv/volsrv/mkfs.c
rf04b5b3 rbad8d41 98 98 } 99 99 100 return retval ;100 return retval == 0 ? EOK : EPARTY; 101 101 } 102 102
Note:
See TracChangeset
for help on using the changeset viewer.