Searched defs:newfile (Results 1 - 25 of 28) sorted by relevance

12

/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/wanboot/keymgmt/
H A Dkeymgmt.c256 boolean_t newfile = B_TRUE; local
267 newfile = B_FALSE;
313 if (!newfile) {
/illumos-gate/usr/src/cmd/filesync/
H A Drules.c287 { FILE *newfile; local
300 newfile = fopen(tmpname, "w+");
301 if (newfile == NULL) {
310 errs |= rw_header(newfile);
311 errs |= rw_base(newfile, &omnibase);
313 errs |= rw_base(newfile, bp);
315 if (ferror(newfile)) {
321 if (fclose(newfile)) {
H A Dbase.c665 { FILE *newfile; local
681 newfile = fopen(tmpname, "w+");
682 if (newfile == NULL) {
688 errs |= bw_header(newfile);
690 errs |= bw_base(newfile, bp);
692 if (ferror(newfile)) {
698 if (fclose(newfile)) {
/illumos-gate/usr/src/cmd/genmsg/
H A Dmain.c276 char *newfile; local
281 newfile = srcfile;
284 if ((newfile = malloc(len)) == NULL) {
289 (void) snprintf(newfile, len, "%s%s",
293 if (is_writable(newfile) == FALSE) {
295 "cannot create \"%s\": permission denied"), newfile);
343 (void) file_copy(tmpfile, newfile);
/illumos-gate/usr/src/cmd/tnf/prex/
H A Dsource.c134 FILE *newfile; local
137 newfile = fopen(path, "r");
138 if (!newfile) {
145 new_p->instream = newfile;
/illumos-gate/usr/src/tools/cscope-fast/
H A Dcommand.c487 char newfile[PATHLEN + 1]; /* new file name */ local
608 for (i = 0; fscanf(refsfound, "%s%*s%s%*[^\n]", newfile, linenum) == 2;
615 if (strcmp(newfile, oldfile) != 0) {
618 if (access(newfile, WRITE) != 0) {
621 newfile);
632 (void) strcpy(oldfile, newfile);
/illumos-gate/usr/src/cmd/fuser/
H A Dfuser.c456 int newfile = 0, errors = 0, opts = 0, flags = 0; local
467 if (newfile) {
473 flags = opts = newfile = 0;
514 if ((optind < argc) && (newfile)) {
520 flags = opts = newfile = 0;
526 * newfile is set when a new group of files is found. If all
527 * arguments are processed and newfile isn't set here, then
531 if (!newfile) {
542 newfile = 1;
/illumos-gate/usr/src/cmd/lp/cmd/lpsched/
H A Dfiles.c70 char *newfile = makepath(Lp_Tmp, Local_System, local
74 list[-1] = file = newfile;
/illumos-gate/usr/src/lib/libipadm/common/
H A Dipadm_persist.c690 char newfile[MAXPATHLEN]; local
704 (void) snprintf(newfile, MAXPATHLEN, "%s/%s.new",
706 if ((nfd = open(newfile, O_WRONLY | O_CREAT | O_TRUNC,
717 (void) unlink(newfile);
734 if (rename(newfile, file) < 0) {
736 (void) unlink(newfile);
743 (void) unlink(newfile);
/illumos-gate/usr/src/cmd/consadm/
H A Dconsadm.c368 char newfile[MAXPATHLEN]; local
378 (void) snprintf(newfile, sizeof (newfile), "%s%d",
380 if (((fd = creat(newfile, 0644)) < 0) ||
412 (void) rename(newfile, CONSCONFIG);
423 char newfile[MAXPATHLEN + 1]; local
439 (void) snprintf(newfile, sizeof (newfile), "%s%d",
441 if ((nfp = fopen(newfile, "w")) == NULL) {
472 (void) rename(newfile, CONSCONFI
[all...]
/illumos-gate/usr/src/cmd/awk_xpg4/
H A Dawk2.c46 static FILE *newfile(void);
75 if (fp == FNULL && (fp = newfile()) == FNULL)
158 newfile() function
599 awkinfp = newfile();
/illumos-gate/usr/src/cmd/keyserv/
H A Dkeyserv_cache.c205 int fd, newfile = 0, i, checkvalid = 1; local
277 newfile = 1;
332 if (newfile) {
/illumos-gate/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
2124 FILE *newfile; local
[all...]
/illumos-gate/usr/src/cmd/logadm/
H A Dmain.c783 struct fn *newfile = fn_new(NULL); local
791 hasn = kw_expand(template, newfile, n, isgz);
794 buf2 = fn_s(newfile);
803 rotateto(newfile, opts, n + 1, recentlog, isgz);
805 struct fn *gzfnp = fn_dup(newfile);
827 dirname = fn_dirname(newfile);
834 docopytruncate(opts, fn_s(fnp), fn_s(newfile));
840 kw_init(fnp, newfile);
848 fn_s(fnp), fn_s(newfile));
852 fn_renew(recentlog, fn_s(newfile));
[all...]
/illumos-gate/usr/src/lib/libshell/common/edit/
H A Dhistory.c167 char newfile[16]; local
168 sfsprintf(newfile,sizeof(newfile),"%.8s%d\0",e_devfdNN,acctfd);
169 nv_putval(np,newfile,NV_RDONLY);
/illumos-gate/usr/src/lib/libdladm/common/
H A Dlibdladm.c715 char newfile[MAXPATHLEN]; local
746 (void) snprintf(newfile, MAXPATHLEN, "%s/%s.new",
748 if ((nfd = open(newfile, O_WRONLY | O_CREAT | O_TRUNC,
758 (void) unlink(newfile);
789 if (rename(newfile, file) < 0) {
790 (void) unlink(newfile);
802 (void) unlink(newfile);
/illumos-gate/usr/src/lib/libpkg/common/
H A Dkeystore.c2177 FILE *newfile = NULL; local
2209 if ((newfile = fdopen(fd, "w")) == NULL) {
2216 if (i2d_PKCS12_fp(newfile, contents) == 0) {
2224 (void) fflush(newfile);
2225 (void) fclose(newfile);
2226 newfile = NULL;
2238 if (newfile != NULL)
2239 (void) fclose(newfile);
2262 FILE *newfile; local
2283 if ((newfile
[all...]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dgetutx.c790 utmpxname(const char *newfile) argument
797 if ((len = strlen(newfile)) > MAXFILE-1)
803 if (newfile[len-1] != 'x')
810 (void) strcpy(&utmpxfile[0], newfile);
843 utmpname(const char *newfile) argument
847 if (strlen(newfile) > MAXFILE)
850 if (strcmp(newfile, "/var/adm/utmp") == 0 ||
851 strcmp(newfile, "/var/adm/wtmp") == 0) {
852 (void) strcpy(name, newfile);
857 (void) strcpy(_compat_utmpfile, newfile);
[all...]
/illumos-gate/usr/src/cmd/sgs/ar/common/
H A Dfile.c348 file = newfile();
405 newfile(void) function
/illumos-gate/usr/src/cmd/ldap/common/
H A Dldapmodify.c332 int newfile = 0; local
336 newfile = 1;
344 if ( newfile == 0 ) {
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/ccache/
H A Dcc_file.c1228 int newfile = 0; local
1258 newfile = 1;
1290 if (!newfile) {
1341 *new = newfile;
1360 int newfile = 0; local
1396 newfile = 0;
1399 &f, &newfile);
1434 if (newfile == 0 && (ftruncate(f, 0) == -1)) {
/illumos-gate/usr/src/cmd/modload/
H A Ddrvsubr.c351 char newfile[MAXPATHLEN]; local
404 (void) snprintf(newfile, sizeof (newfile), "%s%s", oldfile, ".hold");
415 if ((newfd = open(newfile, O_WRONLY | O_CREAT | O_EXCL, 0644)) < 0) {
418 newfile);
422 newfile);
430 newfile);
535 if (rename(newfile, oldfile) == -1) {
538 (void) unlink(newfile);
546 if (unlink(newfile)
1408 char newfile[MAXPATHLEN]; local
[all...]
/illumos-gate/usr/src/cmd/dlmgmtd/
H A Ddlmgmt_db.c276 boolean_t newfile = B_FALSE; local
302 newfile = B_TRUE;
309 if (newfile) {
625 char newfile[MAXPATHLEN]; local
639 (void) snprintf(newfile, MAXPATHLEN, "%s.new", file);
640 nfp = dlmgmt_zfopen(newfile, "w", req->ls_zoneid, &err);
654 err = dlmgmt_zrename(newfile, file, req->ls_zoneid);
663 (void) dlmgmt_zunlink(newfile, req->ls_zoneid);
/illumos-gate/usr/src/lib/libzpool/common/
H A Dkernel.c654 const char *newfile; local
660 newfile = strrchr(file, '/');
661 if (newfile != NULL) {
662 newfile = newfile + 1; /* Get rid of leading / */
664 newfile = file;
668 dprintf_find_string(newfile) ||
681 (void) printf("%s, line %d: ", newfile, line);
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/vrrpd/
H A Dvrrpd.c2002 char newfile[MAXPATHLEN]; local
2025 (void) snprintf(newfile, MAXPATHLEN, "%s.new", vrrpd_conffile);
2026 if ((nfd = open(newfile, O_WRONLY | O_CREAT | O_TRUNC,
2029 newfile, strerror(errno));
2036 newfile, strerror(errno));
2109 if (fflush(nfp) == EOF || rename(newfile, vrrpd_conffile) < 0) {
2111 "rename file %s", newfile);
2118 (void) unlink(newfile);

Completed in 108 milliseconds

12