Lines Matching +full:ata +full:- +full:generic

95 /* Function prototypes for non-ANSI C Compilers */
123 "ata"
129 "ISP-80"
158 * there are none, it returns -1.
186 * As soon as we hit a non-option, we're done. in do_options()
188 if (*argv[i] != '-') in do_options()
197 * of the main loop so they aren't re-interpreted. in do_options()
265 return (-1); in do_options()
272 err_print("Usage: format [-s][-d disk_name]"); in usage()
273 err_print("[-t disk_type][-p partition_name]\n"); in usage()
274 err_print("\t[-f cmd_file][-l log_file]"); in usage()
275 err_print("[-x data_file] [-m] [-M] [-e] disk_list\n"); in usage()
287 * globally-accessible data, not data on the stack, because each
304 * Create a singly-linked list of controller types so that we may in sup_init()
324 err_print("Unable to open data file '%s' - %s.\n", in sup_init()
332 * If found, we use it as a colon-separated list in sup_init()
363 if (stat(fname, &stbuf) == -1) { in sup_init()
364 err_print("Unable to access '%s' - %s.\n", in sup_init()
368 if (*(p-1) != '/') in sup_init()
381 * that are inconsistent - this would be very confusing. in sup_init()
408 * Step through the data file a meta-line at a time. There are in sup_prxfile()
409 * typically several backslashed newlines in each meta-line, in sup_prxfile()
566 dtype->dtype_asciilabel = dtype_name; in sup_setdtype()
570 dtype->dtype_filename = file_name; in sup_setdtype()
571 dtype->dtype_lineno = data_lineno; in sup_setdtype()
641 if (strcmp(mlp->ctlr_type->ctype_name, in sup_setdtype()
644 mlp = mlp->next; in sup_setdtype()
669 ctype = mlp->ctlr_type; in sup_setdtype()
689 dtype->dtype_ncyl = val; in sup_setdtype()
692 dtype->dtype_acyl = val; in sup_setdtype()
695 dtype->dtype_pcyl = val; in sup_setdtype()
698 dtype->dtype_nhead = val; in sup_setdtype()
701 dtype->dtype_nsect = val; in sup_setdtype()
704 dtype->dtype_rpm = val; in sup_setdtype()
707 dtype->dtype_bpt = val; in sup_setdtype()
710 dtype->dtype_bps = val; in sup_setdtype()
713 dtype->dtype_dr_type = val; in sup_setdtype()
716 dtype->dtype_cache = val; in sup_setdtype()
719 dtype->dtype_threshold = val; in sup_setdtype()
722 dtype->dtype_read_retries = val; in sup_setdtype()
725 dtype->dtype_write_retries = val; in sup_setdtype()
728 dtype->dtype_prefetch_min = val; in sup_setdtype()
731 dtype->dtype_prefetch_max = val; in sup_setdtype()
734 dtype->dtype_trks_zone = val; in sup_setdtype()
737 dtype->dtype_atrks = val; in sup_setdtype()
740 dtype->dtype_asect = val; in sup_setdtype()
743 dtype->dtype_psect = val; in sup_setdtype()
746 dtype->dtype_phead = val; in sup_setdtype()
749 dtype->dtype_fmt_time = val; in sup_setdtype()
752 dtype->dtype_cyl_skew = val; in sup_setdtype()
755 dtype->dtype_trk_skew = val; in sup_setdtype()
766 dtype->dtype_options = flags; in sup_setdtype()
771 if ((!(ctype->ctype_flags & CF_SCSI)) && (!(flags & SUP_BPT)) && in sup_setdtype()
772 (!(ctype->ctype_flags & CF_NOFORMAT))) { in sup_setdtype()
776 if ((ctype->ctype_flags & CF_SMD_DEFS) && (!(flags & SUP_BPS))) { in sup_setdtype()
784 type = ctype->ctype_dlist; in sup_setdtype()
786 ctype->ctype_dlist = dtype; in sup_setdtype()
788 while (type->dtype_next != NULL) in sup_setdtype()
789 type = type->dtype_next; in sup_setdtype()
790 type->dtype_next = dtype; in sup_setdtype()
889 * Get right-hand of expression - accept optional tilde in sup_change_spec()
921 cp->pageno = pageno; in sup_change_spec()
922 cp->byteno = byteno; in sup_change_spec()
923 cp->mode = mode; in sup_change_spec()
924 cp->value = value; in sup_change_spec()
971 pinfo->pinfo_name = pinfo_name; in sup_setpart()
975 pinfo->pinfo_filename = file_name; in sup_setpart()
976 pinfo->pinfo_lineno = data_lineno; in sup_setpart()
1066 if (strcmp(mlp->ctlr_type->ctype_name, in sup_setpart()
1069 mlp = mlp->next; in sup_setpart()
1087 ctype = mlp->ctlr_type; in sup_setpart()
1091 for (dtype = ctype->ctype_dlist; dtype != NULL; in sup_setpart()
1092 dtype = dtype->dtype_next) { in sup_setpart()
1093 if (strcmp(dtype->dtype_asciilabel, disk) == 0) in sup_setpart()
1109 nhead = dtype->dtype_nhead; in sup_setpart()
1110 nsect = dtype->dtype_nsect; in sup_setpart()
1111 acyl = dtype->dtype_acyl; in sup_setpart()
1112 ncyl = dtype->dtype_ncyl; in sup_setpart()
1139 index = ident[0] - PARTITION_BASE; in sup_setpart()
1148 * W (writable) or R (read-only) in sup_setpart()
1153 vtoc_tag = pinfo->vtoc.v_part[index].p_tag; in sup_setpart()
1154 vtoc_flag = pinfo->vtoc.v_part[index].p_flag; in sup_setpart()
1207 if (val1 == (uint_t)(-1)) { in sup_setpart()
1237 if (val2 == (uint_t)(-1)) { in sup_setpart()
1245 pinfo->pinfo_map[index].dkl_cylno = val1; in sup_setpart()
1246 pinfo->pinfo_map[index].dkl_nblk = val2; in sup_setpart()
1247 pinfo->vtoc.v_part[index].p_tag = vtoc_tag; in sup_setpart()
1248 pinfo->vtoc.v_part[index].p_flag = vtoc_flag; in sup_setpart()
1251 pinfo->vtoc.v_part[index].p_start = val1 * (nhead * nsect); in sup_setpart()
1252 pinfo->vtoc.v_part[index].p_size = val2; in sup_setpart()
1255 pinfo->vtoc.v_part[index].p_tag = 0; in sup_setpart()
1256 pinfo->vtoc.v_part[index].p_flag = 0; in sup_setpart()
1257 pinfo->vtoc.v_part[index].p_start = 0; in sup_setpart()
1258 pinfo->pinfo_map[index].dkl_cylno = 0; in sup_setpart()
1274 parts = dtype->dtype_plist; in sup_setpart()
1276 dtype->dtype_plist = pinfo; in sup_setpart()
1278 while (parts->pinfo_next != NULL) in sup_setpart()
1279 parts = parts->pinfo_next; in sup_setpart()
1280 parts->pinfo_next = pinfo; in sup_setpart()
1285 * Open the disk device - just a wrapper for open.
1317 err_print("Cannot get current directory - %s\n", in do_search()
1321 if (chdir(directory) == -1) { in do_search()
1322 err_print("Cannot set directory to %s - %s\n", in do_search()
1360 err_print("Cannot open %s - %s\n", in do_search()
1369 * all user-defined names to override the default names. in do_search()
1372 if (strcmp(dp->d_name, ".") == 0 || in do_search()
1373 strcmp(dp->d_name, "..") == 0) in do_search()
1375 if (!conventional_name(dp->d_name)) { in do_search()
1376 if (!fdisk_physical_name(dp->d_name)) { in do_search()
1378 * If non-conventional name represents in do_search()
1379 * a link to non-s2 slice , ignore it. in do_search()
1382 (dp->d_name)) { in do_search()
1385 (void) strcat(path, dp->d_name); in do_search()
1387 dp->d_name, path); in do_search()
1400 if (strcmp(dp->d_name, ".") == 0 || in do_search()
1401 strcmp(dp->d_name, "..") == 0) in do_search()
1403 if (whole_disk_name(dp->d_name)) { in do_search()
1406 (void) strcat(path, dp->d_name); in do_search()
1407 canonicalize_name(s, dp->d_name); in do_search()
1414 if (closedir(dir) == -1) { in do_search()
1415 err_print("Cannot close directory %s - %s\n", in do_search()
1427 if (chdir(curdir) == -1) { in do_search()
1428 err_print("Cannot set directory to %s - %s\n", in do_search()
1449 * Tell user the results of the auto-configure process in do_search()
1452 for (disk = disk_list; disk != NULL; disk = disk->disk_next) { in do_search()
1456 if (disk->disk_flags & DSK_AUTO_CONFIG) { in do_search()
1460 fmt_print("%s: ", disk->disk_name); in do_search()
1461 if (disk->disk_flags & DSK_LABEL_DIRTY) { in do_search()
1466 type = disk->disk_type; in do_search()
1467 nblks = type->dtype_ncyl * type->dtype_nhead * in do_search()
1468 type->dtype_nsect; in do_search()
1469 if (disk->label_type == L_TYPE_SOLARIS) in do_search()
1472 scaled = bn2mb(type->capacity); in do_search()
1499 * relative: non-canonical, doesn't begin with a '/'.
1554 if (get_disk_inquiry_prop(disk_info->devfs_name, &vid, &pid, &rid) in get_disk_name()
1556 (void) snprintf(disk_name, MAXNAMELEN - 1, "%s-%s-%s", in get_disk_name()
1567 err_print("\nInquiry failed - %s\n", strerror(errno)); in get_disk_name()
1568 (void) strcpy(disk_name, "Unknown-Unknown-0001"); in get_disk_name()
1612 if (fstat(search_file, &stbuf) == -1 || !S_ISCHR(stbuf.st_mode)) { in add_device_to_disklist()
1638 if (ioctl(search_file, DKIOCGMEDIAINFO, &mediainfo) == -1) { in add_device_to_disklist()
1651 if (mlp->ctlr_type->ctype_ctype == dkinfo.dki_ctype) { in add_device_to_disklist()
1654 mlp = mlp->next; in add_device_to_disklist()
1679 tctlr->ctype_ctype = dkinfo.dki_ctype; in add_device_to_disklist()
1680 tctlr->ctype_name = zalloc(DK_DEVLEN); in add_device_to_disklist()
1681 if (strlcpy(tctlr->ctype_name, dkinfo.dki_cname, in add_device_to_disklist()
1694 destroy_data(tctlr->ctype_name); in add_device_to_disklist()
1698 tctlr->ctype_ops = zalloc(sizeof (struct ctlr_ops)); in add_device_to_disklist()
1701 * copy the generic disk ops structure into local copy. in add_device_to_disklist()
1703 *(tctlr->ctype_ops) = genericops; in add_device_to_disklist()
1705 tctlr->ctype_flags = CF_WLIST; in add_device_to_disklist()
1709 while (mlp->next != NULL) { in add_device_to_disklist()
1710 mlp = mlp->next; in add_device_to_disklist()
1713 mlp->next = zalloc(sizeof (struct mctlr_list)); in add_device_to_disklist()
1714 mlp->next->ctlr_type = tctlr; in add_device_to_disklist()
1722 * second time. This permits the user-defined names in add_device_to_disklist()
1737 * generic check for reserved disks here, including intel disks. in add_device_to_disklist()
1767 for (dptr = disk_list; dptr->disk_next != NULL; in add_device_to_disklist()
1768 dptr = dptr->disk_next) in add_device_to_disklist()
1770 dptr->disk_next = search_disk; in add_device_to_disklist()
1775 search_disk->disk_dkinfo = dkinfo; in add_device_to_disklist()
1777 search_disk->label_type = L_TYPE_EFI; in add_device_to_disklist()
1779 search_disk->label_type = L_TYPE_SOLARIS; in add_device_to_disklist()
1784 search_disk->disk_name = alloc_string(devname); in add_device_to_disklist()
1785 search_disk->disk_path = alloc_string(devpath); in add_device_to_disklist()
1790 search_disk->disk_lbasize = cur_blksz; in add_device_to_disklist()
1797 search_disk->devfs_name = get_physical_name(devpath); in add_device_to_disklist()
1805 search_ctlr = search_ctlr->ctlr_next) in add_device_to_disklist()
1806 if (search_ctlr->ctlr_addr == dkinfo.dki_addr && in add_device_to_disklist()
1807 search_ctlr->ctlr_space == dkinfo.dki_space && in add_device_to_disklist()
1808 search_ctlr->ctlr_ctype->ctype_ctype == in add_device_to_disklist()
1821 if (mlp->ctlr_type->ctype_ctype == dkinfo.dki_ctype) in add_device_to_disklist()
1823 mlp = mlp->next; in add_device_to_disklist()
1842 search_ctlr->ctlr_ctype = mlp->ctlr_type; in add_device_to_disklist()
1846 for (cptr = ctlr_list; cptr->ctlr_next != NULL; in add_device_to_disklist()
1847 cptr = cptr->ctlr_next) in add_device_to_disklist()
1849 cptr->ctlr_next = search_ctlr; in add_device_to_disklist()
1855 search_ctlr->ctlr_cname[i] = dkinfo.dki_cname[i]; in add_device_to_disklist()
1856 search_ctlr->ctlr_dname[i] = dkinfo.dki_dname[i]; in add_device_to_disklist()
1861 search_ctlr->ctlr_cname[i] = 0; in add_device_to_disklist()
1862 search_ctlr->ctlr_dname[i] = 0; in add_device_to_disklist()
1864 search_ctlr->ctlr_flags = dkinfo.dki_flags; in add_device_to_disklist()
1865 search_ctlr->ctlr_num = dkinfo.dki_cnum; in add_device_to_disklist()
1866 search_ctlr->ctlr_addr = dkinfo.dki_addr; in add_device_to_disklist()
1867 search_ctlr->ctlr_space = dkinfo.dki_space; in add_device_to_disklist()
1868 search_ctlr->ctlr_prio = dkinfo.dki_prio; in add_device_to_disklist()
1869 search_ctlr->ctlr_vec = dkinfo.dki_vec; in add_device_to_disklist()
1875 search_disk->disk_ctlr = search_ctlr; in add_device_to_disklist()
1878 search_disk->disk_flags |= DSK_RESERVED; in add_device_to_disklist()
1880 search_disk->disk_flags |= DSK_UNAVAILABLE; in add_device_to_disklist()
1884 search_disk->disk_flags &= ~(DSK_RESERVED | DSK_UNAVAILABLE); in add_device_to_disklist()
1892 if (search_disk->label_type == L_TYPE_SOLARIS) { in add_device_to_disklist()
1899 * disk, we can attempt to auto-sense the disk in add_device_to_disklist()
1902 ctlr = search_ctlr->ctlr_ctype; in add_device_to_disklist()
1903 if ((status == -1) && (ctlr->ctype_ctype == DKC_SCSI_CCS)) { in add_device_to_disklist()
1906 search_disk->disk_name); in add_device_to_disklist()
1909 switch (search_disk->label_type) { in add_device_to_disklist()
1918 search_disk->disk_flags |= in add_device_to_disklist()
1930 search_disk->disk_flags |= in add_device_to_disklist()
1944 if (status == -1) { in add_device_to_disklist()
1949 if (search_disk->label_type == L_TYPE_SOLARIS) { in add_device_to_disklist()
1962 search_disk->disk_flags |= DSK_LABEL; in add_device_to_disklist()
1964 if (search_disk->label_type == L_TYPE_EFI) { in add_device_to_disklist()
1967 type = search_ctlr->ctlr_ctype->ctype_dlist; in add_device_to_disklist()
1969 search_ctlr->ctlr_ctype->ctype_dlist = in add_device_to_disklist()
1972 while (type->dtype_next != NULL) { in add_device_to_disklist()
1973 type = type->dtype_next; in add_device_to_disklist()
1975 type->dtype_next = search_dtype; in add_device_to_disklist()
1977 search_dtype->dtype_next = NULL; in add_device_to_disklist()
1979 search_dtype->vendor = strdup(efi_info.vendor); in add_device_to_disklist()
1980 search_dtype->product = strdup(efi_info.product); in add_device_to_disklist()
1981 search_dtype->revision = strdup(efi_info.revision); in add_device_to_disklist()
1983 if (search_dtype->vendor == NULL || in add_device_to_disklist()
1984 search_dtype->product == NULL || in add_device_to_disklist()
1985 search_dtype->revision == NULL) { in add_device_to_disklist()
1986 free(search_dtype->vendor); in add_device_to_disklist()
1987 free(search_dtype->product); in add_device_to_disklist()
1988 free(search_dtype->revision); in add_device_to_disklist()
1993 search_dtype->capacity = efi_info.capacity; in add_device_to_disklist()
1994 search_disk->disk_type = search_dtype; in add_device_to_disklist()
1998 search_dtype->dtype_plist = search_parts; in add_device_to_disklist()
2000 search_parts->pinfo_name = alloc_string("original"); in add_device_to_disklist()
2001 search_parts->pinfo_next = NULL; in add_device_to_disklist()
2002 search_parts->etoc = efi_info.e_parts; in add_device_to_disklist()
2003 search_disk->disk_parts = search_parts; in add_device_to_disklist()
2008 for (i = 0; i < search_parts->etoc->efi_nparts; i++) { in add_device_to_disklist()
2009 if (search_parts->etoc->efi_parts[i].p_tag == in add_device_to_disklist()
2011 if (search_parts->etoc->efi_parts[i].p_name) { in add_device_to_disklist()
2012 bcopy(search_parts->etoc->efi_parts[i] in add_device_to_disklist()
2013 .p_name, search_disk->v_volume, in add_device_to_disklist()
2016 bzero(search_disk->v_volume, in add_device_to_disklist()
2035 for (search_dtype = search_ctlr->ctlr_ctype->ctype_dlist; in add_device_to_disklist()
2037 search_dtype = search_dtype->dtype_next) in add_device_to_disklist()
2051 type = search_ctlr->ctlr_ctype->ctype_dlist; in add_device_to_disklist()
2053 search_ctlr->ctlr_ctype->ctype_dlist = in add_device_to_disklist()
2056 while (type->dtype_next != NULL) in add_device_to_disklist()
2057 type = type->dtype_next; in add_device_to_disklist()
2058 type->dtype_next = search_dtype; in add_device_to_disklist()
2063 search_dtype->dtype_next = NULL; in add_device_to_disklist()
2068 search_dtype->dtype_asciilabel = (char *) in add_device_to_disklist()
2070 (void) strcpy(search_dtype->dtype_asciilabel, in add_device_to_disklist()
2073 search_dtype->dtype_asciilabel = (char *) in add_device_to_disklist()
2075 (void) strcpy(search_dtype->dtype_asciilabel, in add_device_to_disklist()
2078 search_dtype->dtype_pcyl = search_label.dkl_pcyl; in add_device_to_disklist()
2079 search_dtype->dtype_ncyl = search_label.dkl_ncyl; in add_device_to_disklist()
2080 search_dtype->dtype_acyl = search_label.dkl_acyl; in add_device_to_disklist()
2081 search_dtype->dtype_nhead = search_label.dkl_nhead; in add_device_to_disklist()
2082 search_dtype->dtype_nsect = search_label.dkl_nsect; in add_device_to_disklist()
2083 search_dtype->dtype_rpm = search_label.dkl_rpm; in add_device_to_disklist()
2093 if ((search_ctlr->ctlr_ctype->ctype_ctype != DKC_SCSI_CCS) && in add_device_to_disklist()
2094 (search_ctlr->ctlr_ctype->ctype_ctype != DKC_DIRECT) && in add_device_to_disklist()
2095 (search_ctlr->ctlr_ctype->ctype_ctype != DKC_VBD) && in add_device_to_disklist()
2096 (search_ctlr->ctlr_ctype->ctype_ctype != DKC_PCMCIA_ATA) && in add_device_to_disklist()
2097 (search_ctlr->ctlr_ctype->ctype_ctype != DKC_BLKDEV)) { in add_device_to_disklist()
2098 search_dtype->dtype_flags |= DT_NEED_SPEFS; in add_device_to_disklist()
2105 search_disk->disk_type = search_dtype; in add_device_to_disklist()
2116 for (search_parts = search_dtype->dtype_plist; in add_device_to_disklist()
2118 search_parts = search_parts->pinfo_next) in add_device_to_disklist()
2133 parts = search_dtype->dtype_plist; in add_device_to_disklist()
2135 search_dtype->dtype_plist = search_parts; in add_device_to_disklist()
2137 while (parts->pinfo_next != NULL) in add_device_to_disklist()
2138 parts = parts->pinfo_next; in add_device_to_disklist()
2139 parts->pinfo_next = search_parts; in add_device_to_disklist()
2141 search_parts->pinfo_next = NULL; in add_device_to_disklist()
2148 search_parts->pinfo_name = alloc_string("original"); in add_device_to_disklist()
2155 search_parts->pinfo_map[i] = in add_device_to_disklist()
2159 search_parts->pinfo_map[i].dkl_cylno = in add_device_to_disklist()
2163 search_parts->pinfo_map[i].dkl_nblk = in add_device_to_disklist()
2179 search_disk->v_volume, LEN_DKL_VVOL); in add_device_to_disklist()
2180 search_parts->vtoc = search_label.dkl_vtoc; in add_device_to_disklist()
2182 bzero(search_disk->v_volume, LEN_DKL_VVOL); in add_device_to_disklist()
2189 search_disk->disk_parts = search_parts; in add_device_to_disklist()
2204 if (dp->disk_dkinfo.dki_ctype == dkinfo->dki_ctype && in disk_is_known()
2205 dp->disk_dkinfo.dki_cnum == dkinfo->dki_cnum && in disk_is_known()
2206 dp->disk_dkinfo.dki_unit == dkinfo->dki_unit && in disk_is_known()
2207 strcmp(dp->disk_dkinfo.dki_dname, dkinfo->dki_dname) == 0) { in disk_is_known()
2210 dp = dp->disk_next; in disk_is_known()
2226 if (dtype->dtype_asciilabel == NULL) {
2234 if ((strcmp(label->dkl_asciilabel, dtype->dtype_asciilabel) != 0) ||
2235 (label->dkl_ncyl != dtype->dtype_ncyl) ||
2236 (label->dkl_acyl != dtype->dtype_acyl) ||
2237 (label->dkl_nhead != dtype->dtype_nhead) ||
2238 (label->dkl_nsect != dtype->dtype_nsect)) {
2264 if ((label->dkl_map[i].dkl_cylno !=
2265 pinfo->pinfo_map[i].dkl_cylno) ||
2266 (label->dkl_map[i].dkl_nblk !=
2267 pinfo->pinfo_map[i].dkl_nblk))
2270 if ((pinfo->pinfo_map[i].dkl_cylno !=
2271 label->dkl_vtoc.v_part[i].p_start /
2272 (label->dkl_nhead * label->dkl_nsect)) ||
2273 (pinfo->pinfo_map[i].dkl_nblk !=
2274 label->dkl_vtoc.v_part[i].p_size))
2283 if (label->dkl_vtoc.v_version != pinfo->vtoc.v_version)
2285 if (label->dkl_vtoc.v_nparts != pinfo->vtoc.v_nparts)
2288 if (label->dkl_vtoc.v_part[i].p_tag !=
2289 pinfo->vtoc.v_part[i].p_tag)
2291 if (label->dkl_vtoc.v_part[i].p_flag !=
2292 pinfo->vtoc.v_part[i].p_flag)
2315 if (strcmp(name, disk->disk_name) == 0) { in diskname_match()
2342 if (disk->disk_dkinfo.dki_ctype == dkinfo.dki_ctype && in diskname_match()
2343 disk->disk_dkinfo.dki_cnum == dkinfo.dki_cnum && in diskname_match()
2344 disk->disk_dkinfo.dki_unit == dkinfo.dki_unit && in diskname_match()
2345 strcmp(disk->disk_dkinfo.dki_dname, dkinfo.dki_dname) == 0) { in diskname_match()
2364 err_print(" - %s (%d)\n", file_name, data_lineno); in datafile_error()
2368 * Re-sync the parsing at the beginning of the next line in datafile_error()
2402 dp1 = mlp->ctlr_type->ctype_dlist; in search_duplicate_dtypes()
2404 dp2 = dp1->dtype_next; in search_duplicate_dtypes()
2407 dp2 = dp2->dtype_next; in search_duplicate_dtypes()
2409 dp1 = dp1->dtype_next; in search_duplicate_dtypes()
2411 mlp = mlp->next; in search_duplicate_dtypes()
2436 dp = mlp->ctlr_type->ctype_dlist; in search_duplicate_pinfo()
2438 pp1 = dp->dtype_plist; in search_duplicate_pinfo()
2440 pp2 = pp1->pinfo_next; in search_duplicate_pinfo()
2443 pp2 = pp2->pinfo_next; in search_duplicate_pinfo()
2445 pp1 = pp1->pinfo_next; in search_duplicate_pinfo()
2447 dp = dp->dtype_next; in search_duplicate_pinfo()
2449 mlp = mlp->next; in search_duplicate_pinfo()
2473 if (strcmp(dp1->dtype_asciilabel, dp2->dtype_asciilabel) != 0) {
2481 result |= (dp1->dtype_flags != dp2->dtype_flags);
2482 result |= (dp1->dtype_options != dp2->dtype_options);
2483 result |= (dp1->dtype_fmt_time != dp2->dtype_fmt_time);
2484 result |= (dp1->dtype_bpt != dp2->dtype_bpt);
2485 result |= (dp1->dtype_ncyl != dp2->dtype_ncyl);
2486 result |= (dp1->dtype_acyl != dp2->dtype_acyl);
2487 result |= (dp1->dtype_pcyl != dp2->dtype_pcyl);
2488 result |= (dp1->dtype_nhead != dp2->dtype_nhead);
2489 result |= (dp1->dtype_nsect != dp2->dtype_nsect);
2490 result |= (dp1->dtype_rpm != dp2->dtype_rpm);
2491 result |= (dp1->dtype_cyl_skew != dp2->dtype_cyl_skew);
2492 result |= (dp1->dtype_trk_skew != dp2->dtype_trk_skew);
2493 result |= (dp1->dtype_trks_zone != dp2->dtype_trks_zone);
2494 result |= (dp1->dtype_atrks != dp2->dtype_atrks);
2495 result |= (dp1->dtype_asect != dp2->dtype_asect);
2496 result |= (dp1->dtype_cache != dp2->dtype_cache);
2497 result |= (dp1->dtype_threshold != dp2->dtype_threshold);
2498 result |= (dp1->dtype_read_retries != dp2->dtype_read_retries);
2499 result |= (dp1->dtype_write_retries != dp2->dtype_write_retries);
2500 result |= (dp1->dtype_prefetch_min != dp2->dtype_prefetch_min);
2501 result |= (dp1->dtype_prefetch_max != dp2->dtype_prefetch_max);
2503 result |= (dp1->dtype_specifics[i] != dp2->dtype_specifics[i]);
2506 cp1 = dp1->dtype_chglist;
2507 cp2 = dp2->dtype_chglist;
2513 result |= (cp1->pageno != cp2->pageno);
2514 result |= (cp1->byteno != cp2->byteno);
2515 result |= (cp1->mode != cp2->mode);
2516 result |= (cp1->value != cp2->value);
2517 cp1 = cp1->next;
2518 cp2 = cp2->next;
2523 dp1->dtype_asciilabel);
2524 if (dp1->dtype_filename != NULL &&
2525 dp2->dtype_filename != NULL) {
2526 err_print("%s (%d) - %s (%d)\n",
2527 dp1->dtype_filename, dp1->dtype_lineno,
2528 dp2->dtype_filename, dp2->dtype_lineno);
2564 if (strcmp(pp1->pinfo_name, pp2->pinfo_name) != 0) {
2572 map1 = pp1->pinfo_map;
2573 map2 = pp2->pinfo_map;
2575 result |= (map1->dkl_cylno != map2->dkl_cylno);
2576 result |= (map1->dkl_nblk != map2->dkl_nblk);
2582 vp1 = pp1->vtoc.v_part;
2583 vp2 = pp2->vtoc.v_part;
2585 result |= (vp1->p_tag != vp2->p_tag);
2586 result |= (vp1->p_flag != vp2->p_flag);
2591 pp1->pinfo_name);
2592 if (pp1->pinfo_filename != NULL &&
2593 pp2->pinfo_filename != NULL) {
2594 err_print("%s (%d) - %s (%d)\n",
2595 pp1->pinfo_filename, pp1->pinfo_lineno,
2596 pp2->pinfo_filename, pp2->pinfo_lineno);
2612 * Returns -1 in the case of an error.
2641 blks = -1; in str2blks()
2651 * Returns -1 in the case of an error.
2674 cyls = -1; in str2cyls()
2698 if (disk->dtype_chglist == NULL) { in new_chg_list()
2699 disk->dtype_chglist = nc; in new_chg_list()
2701 for (cp = disk->dtype_chglist; cp->next; cp = cp->next) in new_chg_list()
2703 cp->next = nc; in new_chg_list()
2705 nc->next = NULL; in new_chg_list()
2735 err_print("getcwd() failed - %s\n", strerror(errno)); in get_physical_name()
2746 if (chdir(s) == -1) { in get_physical_name()
2747 err_print("cannot chdir() to %s - %s\n", in get_physical_name()
2759 if (stat(s, &stbuf) == -1) { in get_physical_name()
2762 if (lstat(s, &stbuf) == -1) { in get_physical_name()
2763 err_print("%s: lstat() failed - %s\n", in get_physical_name()
2787 err_print("getcwd() failed - %s\n", in get_physical_name()
2804 if (i == -1) { in get_physical_name()
2805 err_print("%s: readlink() failed - %s\n", in get_physical_name()
2821 if (chdir(dir) == -1) { in get_physical_name()
2822 err_print("cannot chdir() to %s - %s\n", in get_physical_name()
2833 if (chdir(savedir) == -1) { in get_physical_name()
2834 err_print("cannot chdir() to %s - %s\n", in get_physical_name()
2855 for (d = disk_list; d != NULL; d = d->disk_next) { in sort_disk_list()
2869 for (d = disk_list; d != NULL; d = d->disk_next) { in sort_disk_list()
2887 (*dp++)->disk_next = *dp2++; in sort_disk_list()
2912 s1 = (*((struct disk_info **)arg1))->disk_name; in disk_name_compare()
2913 s2 = (*((struct disk_info **)arg2))->disk_name; in disk_name_compare()
2922 return (n1 - n2); in disk_name_compare()
2934 return (*s1 - *s2); in disk_name_compare()
2945 for (x = nctypes; x != 0; x--) { in make_controller_list()
2947 ctlrp->next = controlp; in make_controller_list()
2948 ctlrp->ctlr_type = &ctlr_types[x - 1]; in make_controller_list()
2993 * This Function checks if the non-conventional name is a a link to
3008 localname, symname, MAXPATHLEN - 1)) != -1) { in name_represents_wholedisk()
3012 (sizeof (DISK_PREFIX) - 1)) == 0) in name_represents_wholedisk()
3013 nameptr += (sizeof (DISK_PREFIX) - 1); in name_represents_wholedisk()