Lines Matching refs:rc

385 	int rc;
404 rc = sv_init_devs();
405 if (rc != 0 && rc != EAGAIN) {
566 int rc = DDI_FAILURE;
572 rc = DDI_SUCCESS;
580 rc = DDI_SUCCESS;
587 return (rc);
887 int rc;
891 rc = nsc_reserve(fd, flags);
892 if (rc == EINTR) {
896 } while ((rc == EINTR) && (eintr_count < MAX_EINTR_COUNT));
898 return (rc);
910 int rc;
932 rc = sv_get_state(udev, &svp);
933 if (rc) {
936 return (rc);
954 sv_fd_def, (blind_t)udev, &rc);
958 spcs_s_add(kstatus, rc);
973 if ((rc = ldi_ident_from_dev(svp->sv_dev, &li)) == 0) {
974 rc = ldi_open_by_dev(&svp->sv_dev,
978 if (rc != 0) {
980 spcs_s_add(kstatus, rc);
1086 int rc = 0;
1092 rc = EBUSY;
1100 return (rc);
1108 int rc;
1118 if ((rc = nsc_partsize(svp->sv_fd, &svp->sv_nblocks)) != 0) {
1120 "!svattach_fd: nsc_partsize() failed, rc %d", rc);
1124 if ((rc = nsc_maxfbas(svp->sv_fd, 0, &svp->sv_maxfbas)) != 0) {
1126 "!svattach_fd: nsc_maxfbas() failed, rc %d", rc);
1204 int rc;
1268 rc = sv_reserve(svp->sv_fd,
1270 if (rc == 0) {
1273 rc = nsc_alloc_buf(svp->sv_fd, 0, 1, NSC_READ, &tmph);
1274 if (rc <= 0) {
1416 int rc;
1429 rc = (*fn)(dev, uiop, crp);
1432 rc = (*fn)(dev, uiop, crp);
1436 return (rc);
1450 rc = EPERM;
1454 if ((rc = sv_reserve(svp->sv_fd, NSC_MULTI|NSC_PCATCH)) != 0) {
1460 rc = nsc_uread(svp->sv_fd, uiop, crp);
1462 rc = nsc_uwrite(svp->sv_fd, uiop, crp);
1469 return (rc);
1680 int rc;
1683 rc = sv_init_devs();
1686 return (rc);
1741 int rc = 0; /* Return code -- errno */
1759 if ((cmd != SVIOC_LIST) && ((rc = drv_priv(crp)) != 0))
1760 return (rc);
1815 rc = sv_enable(svc.svc_path, svc.svc_flag,
1818 if (rc == 0) {
1826 DTRACE_PROBE3(sv_ioctl_end, dev_t, dev, int, *rvalp, int, rc);
1828 return (spcs_s_ocopyoutf(&kstatus, svc.svc_error, rc));
1893 rc = sv_disable(makedevice(svc.svc_major, svc.svc_minor),
1896 if (rc == 0) {
1904 DTRACE_PROBE3(sv_ioctl_2, dev_t, dev, int, *rvalp, int, rc);
1906 return (spcs_s_ocopyoutf(&kstatus, svc.svc_error, rc));
1958 rc = sv_list(svn, size, rvalp, ilp32);
1959 if (rc) {
1962 return (spcs_s_ocopyoutf(&kstatus, ustatus, rc));
2056 rc = sv_prepare_unload();
2058 if (ddi_copyout(&rc, (void *)arg, sizeof (rc), mode) < 0) {
2059 rc = EFAULT;
2063 return (rc);
2100 int rw, rc; /* flags and return codes */
2103 rc = 0;
2113 rc = (*fn)(bp);
2116 rc = (*fn)(bp);
2138 if ((rc = sv_reserve(svp->sv_fd, NSC_MULTI|NSC_PCATCH)) != 0) {
2141 if (rc == EINTR)
2143 bioerror(bp, rc);
2213 rc = nsc_alloc_buf(svp->sv_fd, (nsc_off_t)(bp->b_lblkno + fba_off),
2218 if (rc > 0) {
2220 bioerror(bp, rc);
2240 rc = nsc_read(hndl, (hndl->sb_pos + hndl->sb_len - 1), 1, 0);
2241 if (rc > 0) {
2242 bioerror(bp, rc);
2272 rc = nsc_write(hndl, hndl->sb_pos, hndl->sb_len, 0);
2276 if (rc > 0) {
2277 bioerror(bp, rc);
2293 rc = nsc_free_buf(hndl);
2297 if (rc > 0) {
2300 bioerror(bp, rc);
2305 if (rc <= 0)
2313 rc = nsc_free_buf(hndl);
2317 if (rc > 0) {
2320 bioerror(bp, rc);
2428 int rc;
2432 rc = nskern_partition(svp->sv_dev, &pnum);
2433 if (rc != 0) {
2434 return (rc);
2464 rc = EINTR;
2468 if ((rc == 0) && ddi_copyout(&p_size, (void *)(arg + offset),
2470 rc = EFAULT;
2486 rc = EINTR;
2490 if ((rc == 0) && ddi_copyout(&p_size, (void *)(arg + offset),
2492 rc = EFAULT;
2496 return (rc);
2530 int rc;
2532 rc = nskern_partition(svp->sv_dev, &pnum);
2533 if (rc != 0) {
2534 return (rc);
2555 rc = EFAULT;
2572 rc = EFAULT;
2582 rc = EINTR;
2597 if ((rc == 0) && ddi_copyout(&gpt, efi.dki_data, sizeof (gpt), mode)) {
2598 rc = EFAULT;
2602 if ((rc == 0) && ddi_copyout(gpe, efi.dki_data + 1, sgpe, mode)) {
2603 rc = EFAULT;
2612 return (rc);
2638 int pnum, rc;
2641 rc = nskern_partition(svp->sv_dev, &pnum);
2642 if (rc != 0) {
2643 return (rc);
2669 rc = EINTR;
2677 if ((rc == 0) && ddi_copyout(&p_size,
2683 return (rc);
2695 int rc = 0;
2772 rc = (*fn)(dev, cmd, arg, mode, crp, rvalp);
2775 rc = (*fn)(dev, cmd, arg, mode, crp, rvalp);
2778 rc = ENODEV;
2793 if (svp != NULL && rc == 0) {
2796 rc = sv_fix_dkiocgvtoc(arg, mode, svp);
2801 rc = sv_fix_dkiocgetefi(arg, mode, svp);
2805 rc = sv_fix_dkiocpartition(arg, mode, svp);
2815 return (rc);