| /onnv-gate/usr/src/lib/fm/topo/libtopo/common/ |
| H A D | topo_file.c | 49 topo_file_unload(topo_file_t *tfp) in topo_file_unload() argument 52 if (tfp == NULL) in topo_file_unload() 55 if (tfp->tf_filenm != NULL) in topo_file_unload() 56 topo_mod_strfree(tfp->tf_mod, tfp->tf_filenm); in topo_file_unload() 58 if (tfp->tf_tmap != NULL) in topo_file_unload() 59 tf_info_free(tfp->tf_mod, tfp->tf_tmap); in topo_file_unload() 61 topo_mod_free(tfp->tf_mod, tfp, sizeof (topo_file_t)); in topo_file_unload() 68 topo_file_t *tfp; in topo_file_load() local 71 if ((tfp = topo_mod_zalloc(mod, sizeof (topo_file_t))) == NULL) in topo_file_load() 74 tfp->tf_mod = mod; in topo_file_load() [all …]
|
| /onnv-gate/usr/src/lib/lvm/libmeta/common/ |
| H A D | meta_mdcf.c | 55 FILE *tfp = NULL; in meta_update_md_cf() local 66 if ((tfp = fopen(tname, "w")) == NULL) in meta_update_md_cf() 69 (void) fchmod(fileno(tfp), (sbuf.st_mode & 0777)); in meta_update_md_cf() 70 (void) fchown(fileno(tfp), sbuf.st_uid, sbuf.st_gid); in meta_update_md_cf() 76 "# do not hand edit\n"), tfp) == EOF) { in meta_update_md_cf() 82 if (meta_print_all(sp, tname, NULL, tfp, options, NULL, ep) != 0) in meta_update_md_cf() 86 if (fclose(tfp) != 0) { in meta_update_md_cf() 90 tfp = NULL; in meta_update_md_cf() 99 if ((tfp = fopen(tname, "r")) == NULL) { in meta_update_md_cf() 105 while (fgets(line, 1000, tfp) != NULL) { in meta_update_md_cf() [all …]
|
| H A D | meta_systemfile.c | 63 FILE **tfp, /* returned open FILE */ in meta_systemfile_copy() argument 76 assert(tfp != NULL); in meta_systemfile_copy() 79 *tfp = NULL; in meta_systemfile_copy() 93 if ((*tfp = fopen(*tname, "w")) == NULL) { in meta_systemfile_copy() 109 if ((*tfp = fopen(*tname, "w")) == NULL) { in meta_systemfile_copy() 115 if ((fchmod(fileno(*tfp), (sbuf.st_mode & 0777)) in meta_systemfile_copy() 117 (fchown(fileno(*tfp), sbuf.st_uid, sbuf.st_gid) in meta_systemfile_copy() 156 if (fputs(buf, *tfp) == EOF) { in meta_systemfile_copy() 181 if ((fflush(*tfp) != 0) || in meta_systemfile_copy() 182 (fsync(fileno(*tfp)) != 0)) { in meta_systemfile_copy() [all …]
|
| H A D | meta_patch.c | 65 FILE *tfp = NULL; in meta_patch_vfstab() local 107 if ((tfp = fopen(*tname, "w")) == NULL) { in meta_patch_vfstab() 111 if (fchmod(fileno(tfp), (sbuf.st_mode & 0777)) != 0) { in meta_patch_vfstab() 115 if (fchown(fileno(tfp), sbuf.st_uid, sbuf.st_gid) != 0) { in meta_patch_vfstab() 136 if (fputs(buf, tfp) == EOF) { in meta_patch_vfstab() 158 if (fprintf(tfp, "%s\t%s\t%s\t%s\t%s\t%s\t%s\n", in meta_patch_vfstab() 183 if ((fflush(tfp) != 0) || in meta_patch_vfstab() 184 (fsync(fileno(tfp)) != 0) || in meta_patch_vfstab() 185 (fclose(tfp) != 0)) { in meta_patch_vfstab() 189 tfp = NULL; in meta_patch_vfstab() [all …]
|
| /onnv-gate/usr/src/cmd/fm/eversholt/common/ |
| H A D | eftwrite.c | 102 FILE *tfp; in eftwrite() local 108 if ((tfp = tmpfile()) == NULL) in eftwrite() 113 out_altfp(tfp); in eftwrite() 116 rewind(tfp); in eftwrite() 143 while ((cc = fread(buf, 1, BUFLEN, tfp)) > 0) { in eftwrite() 149 if (ferror(tfp)) in eftwrite() 151 rewind(tfp); in eftwrite() 172 while ((cc = fread(buf, 1, BUFLEN, tfp)) > 0) { in eftwrite() 181 if (ferror(tfp)) in eftwrite() 183 (void) fclose(tfp); in eftwrite()
|
| H A D | eftread.c | 79 FILE *tfp; in eftread_fopen() local 168 if ((tfp = tmpfile()) == NULL) in eftread_fopen() 178 if (cc != fwrite(buf, 1, cc, tfp) || ferror(tfp)) in eftread_fopen() 188 (void) fclose(tfp); in eftread_fopen() 199 rewind(tfp); in eftread_fopen() 201 return (tfp); in eftread_fopen()
|
| /onnv-gate/usr/src/cmd/refer/ |
| H A D | sortbib.c | 44 FILE *fp[MXFILES], *tfp; in main() local 82 if ((tfp = fopen(tempfile, "w")) == NULL) { in main() 87 sortbib(fp[i], tfp, i); in main() 88 fclose(tfp); in main() 89 deliver(fp, tfp); /* do disk seeks and read from biblio files */ in main() 98 sortbib(FILE *fp, FILE *tfp, int i) in sortbib() argument 131 fprintf(tfp, "%d %d %d : %s %s %s %s\n", in sortbib() 134 if (ferror(tfp)) { in sortbib() 156 fprintf(tfp, "%d %d %d : %s %s %s %s\n", in sortbib() 158 if (ferror(tfp)) { in sortbib() [all …]
|
| /onnv-gate/usr/src/cmd/cmd-inet/usr.sbin/in.ftpd/ |
| H A D | privatepw.c | 215 FILE *tfp; in main() local 289 if ((tfp = fopen(passwdpath, "w")) == NULL) { in main() 298 addrecord(accessgroup, realgroup, "Adding accessgroup", tfp); in main() 300 fclose(tfp); in main() 312 if ((tfp = fdopen(tfd, "w")) == NULL) { in main() 320 if ((tfp = fopen(tmp, "w")) == NULL) { in main() 339 fputs(line, tfp); in main() 358 fputs(line, tfp); in main() 372 addrecord(accessgroup, realgroup, "Updating accessgroup", tfp); in main() 379 addrecord(accessgroup, realgroup, "Adding accessgroup", tfp); in main() [all …]
|
| /onnv-gate/usr/src/lib/lvm/libsvm/common/ |
| H A D | update_mdconf.c | 162 parse_bootlist(char *line, FILE *tfp) in parse_bootlist() argument 211 if (fprintf(tfp, "%s", output) < 0) { in parse_bootlist() 243 FILE *tfp; in snarf_n_modify_bootlist() local 256 if ((tfp = fopen(tname, "a")) == NULL) in snarf_n_modify_bootlist() 264 if (fprintf(tfp, "%s", NEW_BEGMDDBSTR) < 0) { in snarf_n_modify_bootlist() 273 if (fprintf(tfp, "%s", NEW_ENDMDDBSTR) < 0) { in snarf_n_modify_bootlist() 284 rval = parse_bootlist(buf, tfp); in snarf_n_modify_bootlist() 291 if (fprintf(tfp, "%s\n", buf) < 0) { in snarf_n_modify_bootlist() 301 (void) fclose(tfp); in snarf_n_modify_bootlist()
|
| /onnv-gate/usr/src/cmd/ipf/lib/common/ |
| H A D | ipft_hx.c | 25 static FILE *tfp = NULL; variable 31 if (tfp && tfd != -1) { 32 rewind(tfp); 38 tfp = stdin; 42 tfp = fdopen(tfd, "r"); 74 while (fgets(line, sizeof(line)-1, tfp)) {
|
| H A D | ipft_td.c | 53 static FILE *tfp = NULL; variable 65 tfp = stdin; 68 tfp = fdopen(tfd, "r"); 76 (void) fclose(tfp); in tcpd_close() 103 if (!fgets(lbuf, sizeof(lbuf) - 1, tfp))
|
| H A D | ipft_tx.c | 41 static FILE *tfp = NULL; variable 123 if (tfp && tfd != -1) { 124 rewind(tfp); 130 tfp = stdin; 134 tfp = fdopen(tfd, "r"); 157 while (fgets(line, sizeof(line)-1, tfp)) {
|
| /onnv-gate/usr/src/cmd/cmd-inet/usr.lib/inetd/ |
| H A D | repval.c | 461 FILE *tfp; /* temp fp */ in repvals_to_file() local 481 if ((tfp = fdopen(tfd, "w")) == NULL) { in repvals_to_file() 489 if (fprintf(tfp, "%lld\n", spval->val) <= 0) { in repvals_to_file() 490 (void) fclose(tfp); in repvals_to_file() 495 if (fclose(tfp) != 0) { in repvals_to_file() 536 FILE *tfp; /* temp fp */ in store_retrieve_rep_vals() local 562 if ((tfp = fopen(genfmri_filename, "r")) == NULL) { in store_retrieve_rep_vals() 571 while ((fscanf_ret = fscanf(tfp, "%lld", &tval)) == 1) { in store_retrieve_rep_vals() 588 if (fclose(tfp) != 0) { in store_retrieve_rep_vals() 642 FILE *tfp; /* temp fp */ in add_remove_contract() local [all …]
|
| /onnv-gate/usr/src/cmd/ttymon/ |
| H A D | sttydefs.c | 321 FILE *tfp; /* file pointer for temp file */ local 346 tfp = open_temp(tname); 348 if (copy_file(fp, tfp, 1, line - 1)) { 352 if (copy_file(fp, tfp, line + 1, -1)) { 357 if (fclose(tfp) == EOF) { 418 copy_file(fp, tfp, start, finish) in copy_file() argument 420 FILE *tfp; 451 if (fputs(dummy, tfp) == EOF) 463 if (fputs(dummy, tfp) == EOF)
|
| /onnv-gate/usr/src/cmd/man/src/util/instant.src/ |
| H A D | tables.c | 1226 static struct tblformat *tfp, *tfp2; in TblTFoot() local 1229 TblBuildFormat(ep, &tfp, TFoot); /* gen format for the foot */ in TblTFoot() 1233 if (tfp->next || !TblFormatMatch(tfp, tfp2)) { in TblTFoot() 1240 formP = tfp; /* this becomes the prevailing format */ in TblTFoot() 1307 register struct tblformat *tfp; in TblBuild1Format() local 1311 Calloc(1, tfp, struct tblformat); in TblBuild1Format() 1312 tfp->cols = tblcols; in TblBuild1Format() 1318 tfp->colformat[i] = TblGetAlign(i, ep, source); in TblBuild1Format() 1319 strcpy(tfp->colwidth[i], TblGetWidth(i, ep, TRUE, source)); in TblBuild1Format() 1320 strcpy(tfp->colpwidth[i], TblGetWidth(i, ep, FALSE, source)); in TblBuild1Format() [all …]
|
| /onnv-gate/usr/src/cmd/saf/ |
| H A D | pmadm.c | 555 FILE *tfp; /* file pointer for temp file */ local 587 tfp = open_temp(tname); 589 if (copy_file(fp, tfp, 1, line - 1)) { 595 if (copy_file(fp, tfp, line + 1, -1)) { 601 if (fclose(tfp) == EOF) { 643 FILE *tfp; /* file pointer for temp file */ local 679 tfp = open_temp(tname); 681 if (copy_file(fp, tfp, 1, line - 1)) { 739 (void) fprintf(tfp, "%s", tbuf); 741 if (copy_file(fp, tfp, line + 1, -1)) { [all …]
|
| H A D | admutil.c | 179 copy_file(FILE *fp, FILE *tfp, int start, int finish) in copy_file() argument 208 if (fputs(dummy, tfp) == EOF) in copy_file() 220 if (fputs(dummy, tfp) == EOF) in copy_file()
|
| H A D | sacadm.c | 683 FILE *tfp; /* file pointer for temp file */ local 699 tfp = open_temp(tname); 701 if (copy_file(fp, tfp, 1, line - 1)) { 707 if (copy_file(fp, tfp, line + 1, -1)) { 713 if (fclose(tfp) == EOF) {
|
| /onnv-gate/usr/src/cmd/sendmail/src/ |
| H A D | queue.c | 352 register SM_FILE_T *tfp; local 384 tfp = e->e_lockfp; 385 if (tfp == NULL && newid) 399 (tfp = sm_io_open(SmFtStdiofd, SM_TIME_DEFAULT, 408 tf, (int) geteuid(), tfd, tfp); 411 e->e_lockfp = tfp; 468 if (tfd < 0 || (tfp = sm_io_open(SmFtStdiofd, SM_TIME_DEFAULT, 499 dumpfd(sm_io_getinfo(tfp, SM_IO_WHAT_FD, NULL), true, false); 610 (void) sm_io_fprintf(tfp, SM_TIME_DEFAULT, "V%d\n", QF_VERSION); 613 (void) sm_io_fprintf(tfp, SM_TIME_DEFAULT, "T%ld\n", (long) e->e_ctime); [all …]
|
| /onnv-gate/usr/src/cmd/cmd-inet/usr.bin/rdist/ |
| H A D | docmd.c | 508 FILE *tfp; variable 544 tfp = NULL; 546 if ((tfp = fopen(Tmpfile, "w")) == NULL) { 567 if (tfp != NULL) 568 (void) fclose(tfp); 625 log(tfp, "new: %s\n", name);
|
| /onnv-gate/usr/src/cmd/logadm/ |
| H A D | conf.c | 442 FILE *cfp = NULL, *tfp = NULL; in conf_close() local 495 if ((tfp = fdopen(tfd, "w")) == NULL) in conf_close() 499 conf_print(cfp, tfp); in conf_close() 502 if (tfp != NULL && fclose(tfp) < 0) in conf_close()
|
| /onnv-gate/usr/src/cmd/cmd-inet/usr.sbin/ipqosconf/ |
| H A D | ipqosconf.c | 1757 FILE *tfp; in diffnvlists() local 1771 tfp = validmod(module_name, &openerr); in diffnvlists() 1772 if (tfp == NULL) { in diffnvlists() 1800 res = readtype(tfp, module_name, SHORT_NAME(nme), &type, in diffnvlists() 2070 (void) fclose(tfp); in diffnvlists() 2088 (void) fclose(tfp); in diffnvlists() 3175 FILE *tfp; in printnvlist() local 3191 tfp = validmod(module, &openerr); in printnvlist() 3192 if (tfp == NULL) { in printnvlist() 3226 ret = readtype(tfp, module, param, &type, &enum_nvs, dfltst, in printnvlist() [all …]
|
| /onnv-gate/usr/src/cmd/cron/ |
| H A D | crontab.c | 411 FILE *tfp; local 430 if ((tfp = fdopen(t, "w")) == NULL) { 502 if (fputs(line, tfp) == EOF) { 508 fclose(tfp);
|
| /onnv-gate/usr/src/uts/common/fs/ |
| H A D | dnlc.c | 1666 dcfree_t **prevpp, *tfp; in dnlc_dir_rem_space_by_len() local 1698 tfp = *prevpp; in dnlc_dir_rem_space_by_len() 1703 tfp); in dnlc_dir_rem_space_by_len() 1731 dcfree_t **prevpp, *tfp; in dnlc_dir_rem_space_by_handle() local 1758 tfp = *prevpp; in dnlc_dir_rem_space_by_handle() 1762 kmem_cache_free(dnlc_dir_space_cache, tfp); in dnlc_dir_rem_space_by_handle() 1980 dcfree_t **newhash, *dfp, **nhp, *tfp; in dnlc_dir_adjust_fhash() local 2010 tfp = dfp; in dnlc_dir_adjust_fhash() 2012 nhp = &newhash[DDFHASH(tfp->df_handle, dcp)]; in dnlc_dir_adjust_fhash() 2013 tfp->df_next = *nhp; in dnlc_dir_adjust_fhash() [all …]
|
| /onnv-gate/usr/src/cmd/rcm_daemon/common/ |
| H A D | filesys_rcm.c | 566 FILE *tfp; in disable_vfstab_entry() local 581 tfp = fopen(tmp, "w"); in disable_vfstab_entry() 582 if (tfp == NULL) { in disable_vfstab_entry() 618 if (fputs(l, tfp) == EOF) { in disable_vfstab_entry() 629 if (tfp) in disable_vfstab_entry() 630 (void) fclose(tfp); in disable_vfstab_entry()
|