Home
last modified time | relevance | path

Searched refs:newfile (Results 1 – 25 of 34) sorted by relevance

12

/titanic_50/usr/src/lib/libc/port/gen/
H A Derrlist.awk56 newfile = "new_list.c"
69 print "#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n" >newfile
70 print "#include \"lint.h\"" >newfile
71 print "#include <sys/isa_defs.h>\n" >newfile
72 print "#pragma weak __sys_errs = _sys_errs\n" >newfile
82 print "const int _sys_index[] =\n{" >newfile
96 printf "\t%d,\n", k >newfile
101 print "};\n" >newfile
103 print "/* This is one long string */" >newfile
104 printf "const char _sys_errs[%d] =\n", k >newfile
[all …]
H A Dgetutx.c790 utmpxname(const char *newfile) in utmpxname() argument
797 if ((len = strlen(newfile)) > MAXFILE-1) in utmpxname()
803 if (newfile[len-1] != 'x') in utmpxname()
810 (void) strcpy(&utmpxfile[0], newfile); in utmpxname()
843 utmpname(const char *newfile) in utmpname() argument
847 if (strlen(newfile) > MAXFILE) in utmpname()
850 if (strcmp(newfile, "/var/adm/utmp") == 0 || in utmpname()
851 strcmp(newfile, "/var/adm/wtmp") == 0) { in utmpname()
852 (void) strcpy(name, newfile); in utmpname()
857 (void) strcpy(_compat_utmpfile, newfile); in utmpname()
/titanic_50/usr/src/lib/libsecdb/common/
H A Di.rbac520 while read newfile oldfile ; do
526 cp $newfile ${oldfile}.d/"$PKGINST"
535 cp $newfile $oldfile
537 set_type_and_outfile $newfile ||
540 echo "$0 : $newfile not one of" \
546 dbmerge $type $oldfile $newfile $outfile
548 echo "$0 : failed to merge $newfile with $oldfile"
/titanic_50/usr/src/cmd/genmsg/
H A Dmain.c276 char *newfile; in main() local
281 newfile = srcfile; in main()
284 if ((newfile = malloc(len)) == NULL) { in main()
289 (void) snprintf(newfile, len, "%s%s", in main()
293 if (is_writable(newfile) == FALSE) { in main()
295 "cannot create \"%s\": permission denied"), newfile); in main()
343 (void) file_copy(tmpfile, newfile); in main()
/titanic_50/usr/src/cmd/filesync/
H A Drules.c287 { FILE *newfile; in write_rules() local
300 newfile = fopen(tmpname, "w+"); in write_rules()
301 if (newfile == NULL) { in write_rules()
310 errs |= rw_header(newfile); in write_rules()
311 errs |= rw_base(newfile, &omnibase); in write_rules()
313 errs |= rw_base(newfile, bp); in write_rules()
315 if (ferror(newfile)) { in write_rules()
321 if (fclose(newfile)) { in write_rules()
H A Dbase.c665 { FILE *newfile; in write_baseline() local
681 newfile = fopen(tmpname, "w+"); in write_baseline()
682 if (newfile == NULL) { in write_baseline()
688 errs |= bw_header(newfile); in write_baseline()
690 errs |= bw_base(newfile, bp); in write_baseline()
692 if (ferror(newfile)) { in write_baseline()
698 if (fclose(newfile)) { in write_baseline()
/titanic_50/usr/src/cmd/fuser/
H A Dfuser.c456 int newfile = 0, errors = 0, opts = 0, flags = 0; in main() local
467 if (newfile) { in main()
473 flags = opts = newfile = 0; in main()
514 if ((optind < argc) && (newfile)) { in main()
520 flags = opts = newfile = 0; in main()
531 if (!newfile) { in main()
542 newfile = 1; in main()
/titanic_50/usr/src/cmd/tnf/prex/
H A Dsource.c134 FILE *newfile; in source_file() local
137 newfile = fopen(path, "r"); in source_file()
138 if (!newfile) { in source_file()
145 new_p->instream = newfile; in source_file()
/titanic_50/usr/src/cmd/consadm/
H A Dconsadm.c368 char newfile[MAXPATHLEN]; in addtolist() local
378 (void) snprintf(newfile, sizeof (newfile), "%s%d", in addtolist()
380 if (((fd = creat(newfile, 0644)) < 0) || in addtolist()
412 (void) rename(newfile, CONSCONFIG); in addtolist()
423 char newfile[MAXPATHLEN + 1]; in removefromlist() local
439 (void) snprintf(newfile, sizeof (newfile), "%s%d", in removefromlist()
441 if ((nfp = fopen(newfile, "w")) == NULL) { in removefromlist()
472 (void) rename(newfile, CONSCONFIG); in removefromlist()
475 (void) unlink(newfile); in removefromlist()
/titanic_50/usr/src/cmd/modload/
H A Ddrvsubr.c351 char newfile[MAXPATHLEN]; in delete_entry() local
404 (void) snprintf(newfile, sizeof (newfile), "%s%s", oldfile, ".hold"); in delete_entry()
415 if ((newfd = open(newfile, O_WRONLY | O_CREAT | O_EXCL, 0644)) < 0) { in delete_entry()
418 newfile); in delete_entry()
422 newfile); in delete_entry()
430 newfile); in delete_entry()
535 if (rename(newfile, oldfile) == -1) { in delete_entry()
538 (void) unlink(newfile); in delete_entry()
546 if (unlink(newfile) == -1) { in delete_entry()
547 (void) fprintf(stderr, gettext(ERR_CANT_RM), newfile); in delete_entry()
[all …]
/titanic_50/usr/src/tools/cscope-fast/
H A Dcommand.c487 char newfile[PATHLEN + 1]; /* new file name */ in changestring() local
608 for (i = 0; fscanf(refsfound, "%s%*s%s%*[^\n]", newfile, linenum) == 2; in changestring()
615 if (strcmp(newfile, oldfile) != 0) { in changestring()
618 if (access(newfile, WRITE) != 0) { in changestring()
621 newfile); in changestring()
632 (void) strcpy(oldfile, newfile); in changestring()
/titanic_50/usr/src/cmd/krb5/ldap_util/
H A Dkdb5_ldap_services.c1817 FILE *newfile = NULL; local
1829 newfile = fopen(tmp_file, "w+F");
1831 if (newfile == NULL) {
1840 if (fprintf(newfile, "%s", encrypted_passwd.value) < 0) {
1842 fclose(newfile);
1848 if (fprintf(newfile, "%s", line) < 0) {
1850 fclose(newfile);
1859 fclose(newfile);
1868 fclose(newfile);
1869 newfile = NULL;
[all …]
/titanic_50/usr/src/cmd/logadm/
H A Dmain.c783 struct fn *newfile = fn_new(NULL); in rotateto() local
791 hasn = kw_expand(template, newfile, n, isgz); in rotateto()
794 buf2 = fn_s(newfile); in rotateto()
803 rotateto(newfile, opts, n + 1, recentlog, isgz); in rotateto()
805 struct fn *gzfnp = fn_dup(newfile); in rotateto()
827 dirname = fn_dirname(newfile); in rotateto()
834 docopytruncate(opts, fn_s(fnp), fn_s(newfile)); in rotateto()
840 kw_init(fnp, newfile); in rotateto()
848 fn_s(fnp), fn_s(newfile)); in rotateto()
852 fn_renew(recentlog, fn_s(newfile)); in rotateto()
/titanic_50/usr/src/lib/libipadm/common/
H A Dipadm_persist.c690 char newfile[MAXPATHLEN]; in ipadm_rw_db() local
704 (void) snprintf(newfile, MAXPATHLEN, "%s/%s.new", in ipadm_rw_db()
706 if ((nfd = open(newfile, O_WRONLY | O_CREAT | O_TRUNC, in ipadm_rw_db()
717 (void) unlink(newfile); in ipadm_rw_db()
734 if (rename(newfile, file) < 0) { in ipadm_rw_db()
736 (void) unlink(newfile); in ipadm_rw_db()
743 (void) unlink(newfile); in ipadm_rw_db()
/titanic_50/usr/src/lib/libzpool/common/
H A Dkernel.c645 const char *newfile; in __dprintf() local
651 newfile = strrchr(file, '/'); in __dprintf()
652 if (newfile != NULL) { in __dprintf()
653 newfile = newfile + 1; /* Get rid of leading / */ in __dprintf()
655 newfile = file; in __dprintf()
659 dprintf_find_string(newfile) || in __dprintf()
672 (void) printf("%s, line %d: ", newfile, line); in __dprintf()
/titanic_50/usr/src/lib/libdladm/common/
H A Dlibdladm.c715 char newfile[MAXPATHLEN]; in i_dladm_rw_db() local
746 (void) snprintf(newfile, MAXPATHLEN, "%s/%s.new", in i_dladm_rw_db()
748 if ((nfd = open(newfile, O_WRONLY | O_CREAT | O_TRUNC, in i_dladm_rw_db()
758 (void) unlink(newfile); in i_dladm_rw_db()
789 if (rename(newfile, file) < 0) { in i_dladm_rw_db()
790 (void) unlink(newfile); in i_dladm_rw_db()
802 (void) unlink(newfile); in i_dladm_rw_db()
/titanic_50/usr/src/cmd/cmd-inet/usr.lib/wanboot/keymgmt/
H A Dkeymgmt.c256 boolean_t newfile = B_TRUE; in process_insert() local
267 newfile = B_FALSE; in process_insert()
313 if (!newfile) { in process_insert()
/titanic_50/usr/src/lib/libpkg/common/
H A Dkeystore.c2177 FILE *newfile = NULL; in write_keystore_file() local
2209 if ((newfile = fdopen(fd, "w")) == NULL) { in write_keystore_file()
2216 if (i2d_PKCS12_fp(newfile, contents) == 0) { in write_keystore_file()
2224 (void) fflush(newfile); in write_keystore_file()
2225 (void) fclose(newfile); in write_keystore_file()
2226 newfile = NULL; in write_keystore_file()
2238 if (newfile != NULL) in write_keystore_file()
2239 (void) fclose(newfile); in write_keystore_file()
2262 FILE *newfile; in read_keystore_file() local
2283 if ((newfile = fdopen(fd, "r")) == NULL) { in read_keystore_file()
[all …]
/titanic_50/usr/src/cmd/dlmgmtd/
H A Ddlmgmt_db.c276 boolean_t newfile = B_FALSE; in dlmgmt_zopen_cb() local
302 newfile = B_TRUE; in dlmgmt_zopen_cb()
309 if (newfile) { in dlmgmt_zopen_cb()
625 char newfile[MAXPATHLEN]; in dlmgmt_process_db_onereq() local
639 (void) snprintf(newfile, MAXPATHLEN, "%s.new", file); in dlmgmt_process_db_onereq()
640 nfp = dlmgmt_zfopen(newfile, "w", req->ls_zoneid, &err); in dlmgmt_process_db_onereq()
654 err = dlmgmt_zrename(newfile, file, req->ls_zoneid); in dlmgmt_process_db_onereq()
663 (void) dlmgmt_zunlink(newfile, req->ls_zoneid); in dlmgmt_process_db_onereq()
/titanic_50/usr/src/cmd/sgs/ar/common/
H A Dinc.h150 extern ARFILE *newfile(void);
/titanic_50/usr/src/cmd/awk_xpg4/
H A Dawk2.c46 static FILE *newfile(void);
75 if (fp == FNULL && (fp = newfile()) == FNULL) in nextrecord()
158 newfile() in newfile() function
599 awkinfp = newfile(); in openfile()
/titanic_50/usr/src/cmd/lp/cmd/lpsched/
H A Dfiles.c70 char *newfile = makepath(Lp_Tmp, Local_System, in chfiles() local
74 list[-1] = file = newfile; in chfiles()
/titanic_50/usr/src/cmd/stmsboot/
H A Dstmsboot.sh132 newfile=`basename $file`
133 $CP $file $SAVEDIR/$newfile.$cmd.$NOW
/titanic_50/usr/src/lib/libshell/common/edit/
H A Dhistory.c167 char newfile[16]; in acctinit() local
168 sfsprintf(newfile,sizeof(newfile),"%.8s%d\0",e_devfdNN,acctfd); in acctinit()
169 nv_putval(np,newfile,NV_RDONLY); in acctinit()
/titanic_50/usr/src/cmd/devfsadm/
H A Ddevfsadm.c3119 char newfile[PATH_MAX + 1]; in devfsadm_rm_work() local
3133 (void) strcpy(newfile, dev_dir); in devfsadm_rm_work()
3134 (void) strcat(newfile, "/"); in devfsadm_rm_work()
3135 (void) strcat(newfile, file); in devfsadm_rm_work()
3142 ((linksize = readlink(newfile, contents, PATH_MAX)) > 0)) { in devfsadm_rm_work()
3167 vprint(VERBOSE_MID, DEVFSADM_UNLINK, newfile); in devfsadm_rm_work()
3170 s_unlink(newfile); in devfsadm_rm_work()
3171 rm_parent_dir_if_empty(newfile); in devfsadm_rm_work()
5845 char newfile[PATH_MAX + 1]; in devfsadm_copy_file() local
5850 (void) strcpy(newfile, root_dir); in devfsadm_copy_file()
[all …]

12