Lines Matching refs:rc

134 	int rc = 0;  in parse_args()  local
160 rc = 1; in parse_args()
193 rc = 1; in parse_args()
197 rc = 1; in parse_args()
202 if (rc != 0) in parse_args()
203 return (rc); in parse_args()
226 return (rc); in parse_args()
233 int fd, rc; in drop_caches() local
241 rc = write(fd, "3", 1); in drop_caches()
242 if ((rc == -1) || (rc != 1)) { in drop_caches()
248 rc = close(fd); in drop_caches()
249 if (rc == -1) { in drop_caches()
261 int rc, devnull_fd; in run_process() local
279 while ((rc = waitpid(pid, &status, 0)) == -1 && in run_process()
282 if (rc < 0 || !WIFEXITED(status)) in run_process()
295 int rc; in post_hook() local
301 rc = drop_caches(); in post_hook()
302 if (rc) in post_hook()
303 return (rc); in post_hook()
306 rc = run_process(script, argv); in post_hook()
307 if (rc) in post_hook()
308 return (rc); in post_hook()
352 int i, rc; in create_files() local
361 rc = ENOMEM; in create_files()
362 ERROR("Error %d: malloc(%d) bytes for file name\n", rc, in create_files()
371 rc = EINVAL; in create_files()
372 ERROR("Error %d: path too long\n", rc); in create_files()
379 rc = unlink(file); in create_files()
380 if ((rc == -1) && (errno != ENOENT)) { in create_files()
382 rc = errno; in create_files()
386 rc = open(file, O_CREAT, 0644); in create_files()
387 if (rc == -1) { in create_files()
390 rc = errno; in create_files()
394 rc = close(rc); in create_files()
395 if (rc == -1) { in create_files()
396 ERROR("Error %d: close(%d)\n", errno, rc); in create_files()
397 rc = errno; in create_files()
407 rc = post_hook("post"); in create_files()
412 return (rc); in create_files()
427 ssize_t rc = read(rand, buf + bytes_read, bytes - bytes_read); in get_random_bytes() local
428 if (rc < 0) in get_random_bytes()
430 bytes_read += rc; in get_random_bytes()
441 int i, j, rnd_size = size, shift, rc = 0; in setxattrs() local
451 rc = ENOMEM; in setxattrs()
452 ERROR("Error %d: malloc(%d) bytes for xattr value\n", rc, in setxattrs()
460 rc = ENOMEM; in setxattrs()
461 ERROR("Error %d: malloc(%d) bytes for file name\n", rc, in setxattrs()
470 rc = EINVAL; in setxattrs()
471 ERROR("Error %d: path too long\n", rc); in setxattrs()
487 rc = lsetxattr(file, name, value, rnd_size, 0); in setxattrs()
488 if (rc == -1) { in setxattrs()
501 rc = post_hook("post"); in setxattrs()
509 return (rc); in setxattrs()
515 int i, j, rnd_size, shift, rc = 0; in getxattrs() local
528 rc = ENOMEM; in getxattrs()
529 ERROR("Error %d: malloc(%d) bytes for xattr verify\n", rc, in getxattrs()
536 rc = ENOMEM; in getxattrs()
537 ERROR("Error %d: malloc(%d) bytes for xattr value\n", rc, in getxattrs()
549 rc = ENOMEM; in getxattrs()
550 ERROR("Error %d: malloc(%d) bytes for file name\n", rc, in getxattrs()
559 rc = EINVAL; in getxattrs()
560 ERROR("Error %d: path too long\n", rc); in getxattrs()
570 rc = lgetxattr(file, name, value, XATTR_SIZE_MAX); in getxattrs()
571 if (rc == -1) { in getxattrs()
586 if (rnd_size != rc || in getxattrs()
591 rc = 1; in getxattrs()
602 rc = post_hook("post"); in getxattrs()
613 return (rc); in getxattrs()
619 int i, rc; in unlink_files() local
628 rc = ENOMEM; in unlink_files()
630 rc, PATH_MAX); in unlink_files()
638 rc = EINVAL; in unlink_files()
639 ERROR("Error %d: path too long\n", rc); in unlink_files()
646 rc = unlink(file); in unlink_files()
647 if ((rc == -1) && (errno != ENOENT)) { in unlink_files()
659 rc = post_hook("post"); in unlink_files()
664 return (rc); in unlink_files()
670 int rc; in main() local
672 rc = parse_args(argc, argv); in main()
673 if (rc) in main()
674 return (rc); in main()
679 rc = get_random_bytes(xattrbytes, rndsz); in main()
680 if (rc < rndsz) { in main()
682 "got %d\n", errno, rndsz, rc); in main()
683 return (rc); in main()
690 rc = create_files(); in main()
691 if (rc) in main()
692 return (rc); in main()
696 rc = setxattrs(); in main()
697 if (rc) in main()
698 return (rc); in main()
702 rc = getxattrs(); in main()
703 if (rc) in main()
704 return (rc); in main()
708 rc = unlink_files(); in main()
709 if (rc) in main()
710 return (rc); in main()