Lines Matching full:rc

135 	int rc = 0;  in parse_args()  local
161 rc = 1; in parse_args()
194 rc = 1; in parse_args()
198 rc = 1; in parse_args()
203 if (rc != 0) in parse_args()
204 return (rc); in parse_args()
227 return (rc); in parse_args()
234 int fd, rc; in drop_caches() local
242 rc = write(fd, "3", 1); in drop_caches()
243 if ((rc == -1) || (rc != 1)) { in drop_caches()
249 rc = close(fd); in drop_caches()
250 if (rc == -1) { in drop_caches()
262 int rc, devnull_fd; in run_process() local
280 while ((rc = waitpid(pid, &status, 0)) == -1 && in run_process()
283 if (rc < 0 || !WIFEXITED(status)) in run_process()
296 int rc; in post_hook() local
302 rc = drop_caches(); in post_hook()
303 if (rc) in post_hook()
304 return (rc); in post_hook()
307 rc = run_process(script, argv); in post_hook()
308 if (rc) in post_hook()
309 return (rc); in post_hook()
353 int i, rc; in create_files() local
362 rc = ENOMEM; in create_files()
363 ERROR("Error %d: malloc(%d) bytes for file name\n", rc, in create_files()
372 rc = EINVAL; in create_files()
373 ERROR("Error %d: path too long\n", rc); in create_files()
380 rc = unlink(file); in create_files()
381 if ((rc == -1) && (errno != ENOENT)) { in create_files()
383 rc = errno; in create_files()
387 rc = open(file, O_CREAT, 0644); in create_files()
388 if (rc == -1) { in create_files()
391 rc = errno; in create_files()
395 rc = close(rc); in create_files()
396 if (rc == -1) { in create_files()
397 ERROR("Error %d: close(%d)\n", errno, rc); in create_files()
398 rc = errno; in create_files()
408 rc = post_hook("post"); in create_files()
413 return (rc); in create_files()
428 ssize_t rc = read(rand, buf + bytes_read, bytes - bytes_read); in get_random_bytes() local
429 if (rc < 0) in get_random_bytes()
431 bytes_read += rc; in get_random_bytes()
442 int i, j, rnd_size = size, shift, rc = 0; in setxattrs() local
452 rc = ENOMEM; in setxattrs()
453 ERROR("Error %d: malloc(%d) bytes for xattr value\n", rc, in setxattrs()
461 rc = ENOMEM; in setxattrs()
462 ERROR("Error %d: malloc(%d) bytes for file name\n", rc, in setxattrs()
471 rc = EINVAL; in setxattrs()
472 ERROR("Error %d: path too long\n", rc); in setxattrs()
488 rc = lsetxattr(file, name, value, rnd_size, 0); in setxattrs()
489 if (rc == -1) { in setxattrs()
502 rc = post_hook("post"); in setxattrs()
510 return (rc); in setxattrs()
516 int i, j, rnd_size, shift, rc = 0; in getxattrs() local
529 rc = ENOMEM; in getxattrs()
530 ERROR("Error %d: malloc(%d) bytes for xattr verify\n", rc, in getxattrs()
537 rc = ENOMEM; in getxattrs()
538 ERROR("Error %d: malloc(%d) bytes for xattr value\n", rc, in getxattrs()
550 rc = ENOMEM; in getxattrs()
551 ERROR("Error %d: malloc(%d) bytes for file name\n", rc, in getxattrs()
560 rc = EINVAL; in getxattrs()
561 ERROR("Error %d: path too long\n", rc); in getxattrs()
571 rc = lgetxattr(file, name, value, XATTR_SIZE_MAX); in getxattrs()
572 if (rc == -1) { in getxattrs()
587 if (rnd_size != rc || in getxattrs()
592 rc = 1; in getxattrs()
603 rc = post_hook("post"); in getxattrs()
614 return (rc); in getxattrs()
620 int i, rc; in unlink_files() local
629 rc = ENOMEM; in unlink_files()
631 rc, PATH_MAX); in unlink_files()
639 rc = EINVAL; in unlink_files()
640 ERROR("Error %d: path too long\n", rc); in unlink_files()
647 rc = unlink(file); in unlink_files()
648 if ((rc == -1) && (errno != ENOENT)) { in unlink_files()
660 rc = post_hook("post"); in unlink_files()
665 return (rc); in unlink_files()
671 int rc; in main() local
673 rc = parse_args(argc, argv); in main()
674 if (rc) in main()
675 return (rc); in main()
680 rc = get_random_bytes(xattrbytes, rndsz); in main()
681 if (rc < rndsz) { in main()
683 "got %d\n", errno, rndsz, rc); in main()
684 return (rc); in main()
691 rc = create_files(); in main()
692 if (rc) in main()
693 return (rc); in main()
697 rc = setxattrs(); in main()
698 if (rc) in main()
699 return (rc); in main()
703 rc = getxattrs(); in main()
704 if (rc) in main()
705 return (rc); in main()
709 rc = unlink_files(); in main()
710 if (rc) in main()
711 return (rc); in main()