Lines Matching refs:olp

1199 	struct open_list *olp;  in ndmp_execute_cdb()  local
1254 if ((olp = ndmp_open_list_find(adapter_name, sid, lun)) != NULL) { in ndmp_execute_cdb()
1255 fd = olp->ol_fd; in ndmp_execute_cdb()
1390 struct open_list *olp; in ndmp_open_list_find() local
1399 for (olp = LIST_FIRST(olhp); olp != NULL; olp = LIST_NEXT(olp, ol_q)) in ndmp_open_list_find()
1400 if (strcmp(olp->ol_devnm, dev) == 0 && olp->ol_sid == sid && in ndmp_open_list_find()
1401 olp->ol_lun == lun) { in ndmp_open_list_find()
1403 return (olp); in ndmp_open_list_find()
1431 struct open_list *olp; in ndmp_open_list_add() local
1443 if ((olp = ndmp_open_list_find(dev, sid, lun)) != NULL) { in ndmp_open_list_add()
1452 olp->ol_nref++; in ndmp_open_list_add()
1455 } else if ((olp = ndmp_malloc(sizeof (struct open_list))) == NULL) { in ndmp_open_list_add()
1457 } else if ((olp->ol_devnm = strdup(dev)) == NULL) { in ndmp_open_list_add()
1459 free(olp); in ndmp_open_list_add()
1462 olp->cl_conn = conn; in ndmp_open_list_add()
1463 olp->ol_nref = 1; in ndmp_open_list_add()
1464 olp->ol_sid = sid; in ndmp_open_list_add()
1465 olp->ol_lun = lun; in ndmp_open_list_add()
1467 olp->ol_fd = fd; in ndmp_open_list_add()
1469 olp->ol_fd = -1; in ndmp_open_list_add()
1471 LIST_INSERT_HEAD(olhp, olp, ol_q); in ndmp_open_list_add()
1495 struct open_list *olp; in ndmp_open_list_del() local
1501 if ((olp = ndmp_open_list_find(dev, sid, lun)) == NULL) { in ndmp_open_list_del()
1507 if (--olp->ol_nref <= 0) { in ndmp_open_list_del()
1510 LIST_REMOVE(olp, ol_q); in ndmp_open_list_del()
1511 free(olp->ol_devnm); in ndmp_open_list_del()
1512 free(olp); in ndmp_open_list_del()
1535 struct open_list *olp; in ndmp_open_list_release() local
1539 olp = LIST_FIRST(olhp); in ndmp_open_list_release()
1540 while (olp != NULL) { in ndmp_open_list_release()
1541 next = LIST_NEXT(olp, ol_q); in ndmp_open_list_release()
1542 NDMP_LOG(LOG_DEBUG, "olp->conn 0x%08x", olp->cl_conn); in ndmp_open_list_release()
1543 if (olp->cl_conn == conn) { in ndmp_open_list_release()
1546 olp->ol_devnm, olp->ol_sid, olp->ol_lun); in ndmp_open_list_release()
1547 LIST_REMOVE(olp, ol_q); in ndmp_open_list_release()
1548 if (olp->ol_fd > 0) in ndmp_open_list_release()
1549 (void) close(olp->ol_fd); in ndmp_open_list_release()
1550 free(olp->ol_devnm); in ndmp_open_list_release()
1551 free(olp); in ndmp_open_list_release()
1553 olp = next; in ndmp_open_list_release()