Lines Matching refs:cd

144 get_cd_hint(const int cd)  in get_cd_hint()  argument
157 cdhint = SDBC_IOCTL(SDBC_GET_CD_HINT, cd, 0, 0, 0, 0, &ustats); in get_cd_hint()
160 gettext("%s: get cd(%d) hint failed\n"), progname, cd); in get_cd_hint()
275 int cd; in restore_hints() local
299 cd = -1; in restore_hints()
301 cd = get_cd(buf); in restore_hints()
302 if (cd < 0) in restore_hints()
312 if (cd == -1) { in restore_hints()
323 } else if (SDBC_IOCTL(SDBC_SET_CD_HINT, cd, in restore_hints()
339 if (cd == -1) { in restore_hints()
350 } else if (SDBC_IOCTL(SDBC_SET_CD_HINT, cd, NSC_NOCACHE, in restore_hints()
715 cd_to_device(int cd) in cd_to_device() argument
738 if (cs_cur->st_cachesize == 0 || cd >= cs_cur->st_count) in cd_to_device()
741 return (cs_cur->st_shared[cd].sh_filename); in cd_to_device()
751 long cd = 0; in get_device_name() local
771 if (((cd = strtol(arg, (char **)NULL, 10)) > 0) || in get_device_name()
773 device = cd_to_device((int)cd); in get_device_name()
843 save_hint(int cd, int hint, int flag) in save_hint() argument
871 if (cd == -1) in save_hint()
874 (void) strncpy(device, cd_to_device(cd), NSC_MAXPATH); in save_hint()
939 int cd; in scmadm_lintmain() local
1165 cd = get_cd(optarg); in scmadm_lintmain()
1167 if (cd < 0) { in scmadm_lintmain()
1174 hint = get_cd_hint(cd); in scmadm_lintmain()
1176 "options are: "), progname, cd); in scmadm_lintmain()
1184 if (cd < 0) in scmadm_lintmain()
1187 remove_hint(cd_to_device(cd)); in scmadm_lintmain()
1190 if (cd < 0) { in scmadm_lintmain()
1198 if (SDBC_IOCTL(SDBC_SET_CD_HINT, cd, hint, in scmadm_lintmain()
1206 save_hint(cd, hint, flag); in scmadm_lintmain()
1208 " set.\n"), progname, cd, argv[optind]); in scmadm_lintmain()
1220 cd = get_cd(optarg); in scmadm_lintmain()
1221 if (cd < 0) { in scmadm_lintmain()
1231 progname, cd); in scmadm_lintmain()
1236 progname, dev_name, cd); in scmadm_lintmain()
1247 cd = get_cd(argv[optind]); in scmadm_lintmain()
1248 if (cd < 0) { in scmadm_lintmain()
1270 if (SDBC_IOCTL(SDBC_ADUMP, (long)cd, &tt, NULL, 0L, in scmadm_lintmain()
1280 if (cd != -1) in scmadm_lintmain()
1283 cd, tt.tt_max, tt.tt_mask, in scmadm_lintmain()
1290 int cd; in scmadm_lintmain() local
1295 cd = -1; in scmadm_lintmain()
1296 } else if ((cd = get_cd(optarg)) < 0) { in scmadm_lintmain()
1307 if (SDBC_IOCTL(SDBC_INJ_IOERR, cd, ioj_err, ioj_cnt, 0, 0, in scmadm_lintmain()
1316 "processed\n"), progname, cd, ioj_err); in scmadm_lintmain()
1321 int cd; in scmadm_lintmain() local
1325 cd = -1; in scmadm_lintmain()
1326 } else if ((cd = get_cd(optarg)) < 0) { in scmadm_lintmain()
1333 if (SDBC_IOCTL(SDBC_CLR_IOERR, cd, 0, 0, 0, 0, &ustats) in scmadm_lintmain()
1342 "processed\n"), progname, cd); in scmadm_lintmain()
1685 int cd, count, size, flag; local
1722 cd = SDT_ANY_CD; /* any device */
1724 if ((count = SDBC_IOCTL(SDBC_ADUMP, cd, &tt, buf, size,
1741 cd = tt.tt_cd;
1742 (void) sprintf(filename, "%s.%d.%d", "sd_alert", cd, alerts++);
1782 int cd; local
1831 for (cd = 0; cd < cs_cur->st_count; cd++) {
1832 if (cs_cur->st_shared[cd].sh_alloc) {
1833 hint = get_cd_hint(cd);
1835 strlen(cs_cur->st_shared[cd].sh_filename))
1839 cs_cur->st_shared[cd].sh_filename +
1843 cs_cur->st_shared[cd].sh_filename);
1846 (void) printf(gettext("%d\t%-28.*s\t"), cd,
1865 int cd; local
1891 for (cd = 0; cd < cs_cur->st_count; cd++) {
1892 if (cs_cur->st_shared[cd].sh_alloc) {
1894 cs_cur->st_shared[cd].sh_filename)) > 15) {
1897 cs_cur->st_shared[cd].sh_filename +
1901 cs_cur->st_shared[cd].sh_filename);
1904 cd, fn);
1919 int cd, arg_cd = -1; local
1973 for (cd = 0; cd < cs_cur->st_count; cd++) {
1974 if (cs_cur->st_shared[cd].sh_alloc &&
1975 strcmp(s, cs_cur->st_shared[cd].sh_filename) == 0)
1976 return (cd);