/illumos-gate/usr/src/test/zfs-tests/tests/functional/ctime/ |
H A D | ctime_001_pos.c | 55 int (*func)(const char *pfile); 74 get_file_time(const char *pfile, int what, time_t *ptr) in get_file_time() argument 78 if (pfile == NULL || ptr == NULL) { in get_file_time() 82 if (stat(pfile, &stat_buf) == -1) { in get_file_time() 102 do_read(const char *pfile) in do_read() argument 107 if (pfile == NULL) { in do_read() 111 if ((fd = open(pfile, O_RDONLY, ALL_MODE)) == -1) { in do_read() 125 do_write(const char *pfile) in do_write() argument 130 if (pfile == NULL) { in do_write() 134 if ((fd = open(pfile, O_WRONLY, ALL_MODE)) == -1) { in do_write() [all …]
|
/illumos-gate/usr/src/cmd/awk/ |
H A D | main.c | 75 static char **pfile = NULL; /* program filenames from -f's */ variable 130 pfile = realloc(pfile, in main() 132 if (pfile == NULL) in main() 134 pfile[npfile++] = &argv[1][2]; in main() 139 pfile = realloc(pfile, in main() 141 if (pfile == NULL) in main() 143 pfile[npfile++] = argv[1]; in main() 244 yyin = (strcmp(pfile[curpfile], "-") == 0) ? in pgetc() 245 stdin : fopen(pfile[curpfile], "rF"); in pgetc() 247 FATAL("can't open file %s", pfile[curpfile]); in pgetc() [all …]
|
/illumos-gate/usr/src/cmd/krb5/ldap_util/ |
H A D | kdb5_ldap_services.c | 1078 FILE *pfile = NULL; local 1097 pfile = fopen(file_name, "r+F"); 1098 if (pfile == NULL) { 1107 fclose(pfile); 1117 fclose(pfile); 1122 while (fgets(line, MAX_LEN, pfile) != NULL) { 1132 fclose(pfile); 1138 fclose(pfile); 1556 FILE *pfile = NULL; local 1787 pfile = fopen(file_name, "r+F"); [all …]
|
/illumos-gate/usr/src/cmd/hal/addons/cpufreq/ |
H A D | addon-cpufreq.c | 140 FILE *pfile; in edit_power_conf_file() local 167 pfile = fopen (tmp_file, "r+"); in edit_power_conf_file() 168 if (pfile == NULL) { in edit_power_conf_file() 208 while (fgets (tstr, FILE_ARR_SIZE, pfile) != NULL) { in edit_power_conf_file() 228 if (fseek (pfile, fset, SEEK_SET) != 0) { in edit_power_conf_file() 246 if (fseek (pfile, next_fset, SEEK_SET) != 0) { in edit_power_conf_file() 252 if (fgets (tstr, FILE_ARR_SIZE, pfile) != NULL) { in edit_power_conf_file() 256 fseek (pfile, fset, SEEK_SET); in edit_power_conf_file() 257 fputs (temp_str, pfile); in edit_power_conf_file() 260 fseek (pfile, next_fset, SEEK_SET); in edit_power_conf_file() [all …]
|
/illumos-gate/usr/src/cmd/cmd-crypto/cryptoadm/ |
H A D | adm_util.c | 114 FILE *pfile; in update_conf() local 125 if ((pfile = fopen(conf_file, "r+")) == NULL) { in update_conf() 134 if (lockf(fileno(pfile), F_TLOCK, 0) == -1) { in update_conf() 139 (void) fclose(pfile); in update_conf() 152 (void) fclose(pfile); in update_conf() 160 (void) fclose(pfile); in update_conf() 173 while (fgets(buffer, BUFSIZ, pfile) != NULL) { in update_conf() 256 (void) fclose(pfile); in update_conf()
|
H A D | adm_uef.c | 785 FILE *pfile; in uninstall_uef_lib() local 812 if ((pfile = fopen(_PATH_PKCS11_CONF, "r+")) == NULL) { in uninstall_uef_lib() 821 if (lockf(fileno(pfile), F_TLOCK, 0) == -1) { in uninstall_uef_lib() 826 (void) fclose(pfile); in uninstall_uef_lib() 840 (void) fclose(pfile); in uninstall_uef_lib() 854 (void) fclose(pfile); in uninstall_uef_lib() 864 while (fgets(buffer, BUFSIZ, pfile) != NULL) { in uninstall_uef_lib() 913 (void) fclose(pfile); in uninstall_uef_lib() 924 (void) fclose(pfile); in uninstall_uef_lib() 1125 FILE *pfile; in update_pkcs11conf() local [all …]
|
H A D | adm_kef_util.c | 702 FILE *pfile = NULL; in get_kcfconf_info() local 708 if ((pfile = fopen(_PATH_KCF_CONF, "r")) == NULL) { in get_kcfconf_info() 715 while (fgets(buffer, BUFSIZ, pfile) != NULL) { in get_kcfconf_info() 746 (void) fclose(pfile); in get_kcfconf_info() 953 FILE *pfile = NULL; in update_kcfconf() local 991 if ((pfile = fopen(_PATH_KCF_CONF, "r+")) == NULL) { in update_kcfconf() 1001 if (lockf(fileno(pfile), F_TLOCK, 0) == -1) { in update_kcfconf() 1006 (void) fclose(pfile); in update_kcfconf() 1020 (void) fclose(pfile); in update_kcfconf() 1028 (void) fclose(pfile); in update_kcfconf() [all …]
|
H A D | adm_kef.c | 702 FILE *pfile = NULL; in install_kef() local 741 if ((pfile = fopen(_PATH_KCF_CONF, "r+")) == NULL) { in install_kef() 751 if (lockf(fileno(pfile), F_TLOCK, 0) == -1) { in install_kef() 757 (void) fclose(pfile); in install_kef() 771 (void) fclose(pfile); in install_kef() 780 (void) fclose(pfile); in install_kef() 792 while (fgets(buffer, BUFSIZ, pfile) != NULL) { in install_kef() 833 (void) fclose(pfile); in install_kef()
|
/illumos-gate/usr/src/cmd/cmd-crypto/kmfcfg/ |
H A D | uninstall.c | 48 FILE *pfile = NULL; in kc_uninstall() local 113 if ((pfile = fopen(_PATH_KMF_CONF, "r+")) == NULL) { in kc_uninstall() 122 if (lockf(fileno(pfile), F_TLOCK, 0) == -1) { in kc_uninstall() 158 while (fgets(buffer, MAXPATHLEN, pfile) != NULL) { in kc_uninstall() 217 if (pfile != NULL) in kc_uninstall() 218 (void) fclose(pfile); in kc_uninstall()
|
H A D | install.c | 52 FILE *pfile = NULL; in kc_install() local 171 if ((pfile = fopen(_PATH_KMF_CONF, "r+")) == NULL) { in kc_install() 180 if (lockf(fileno(pfile), F_TLOCK, 0) == -1) { in kc_install() 216 while (fgets(buffer, BUFSIZ, pfile) != NULL) { in kc_install() 280 if (pfile != NULL) in kc_install() 281 (void) fclose(pfile); in kc_install()
|
H A D | modify.c | 956 FILE *pfile = NULL; in kc_modify_plugin() local 1050 if ((pfile = fopen(_PATH_KMF_CONF, "r+")) == NULL) { in kc_modify_plugin() 1059 if (lockf(fileno(pfile), F_TLOCK, 0) == -1) { in kc_modify_plugin() 1093 while (fgets(buffer, MAXPATHLEN, pfile) != NULL) { in kc_modify_plugin() 1173 if (pfile != NULL) in kc_modify_plugin() 1174 (void) fclose(pfile); in kc_modify_plugin()
|
/illumos-gate/usr/src/cmd/acct/ |
H A D | acctdusg.c | 58 static char *pfile = NULL; variable 92 pfile = optarg; in main() 99 if (pfile) { in main() 100 if ((pwf = fopen(pfile, "r")) == NULL) { in main() 101 openerr(pfile); in main() 249 if (pfile == NULL) { in charge()
|
/illumos-gate/usr/src/cmd/streams/log/ |
H A D | strerr.c | 110 FILE *pfile; in main() local 160 if ((pfile = popen(mailcmd, "w")) != NULL) { in main() 161 fprintf(pfile, "Streams Error Logger message " in main() 163 prlog(pfile, lp, dbuf, 0); in main() 164 (void) pclose(pfile); in main()
|
/illumos-gate/usr/src/cmd/genmsg/ |
H A D | genmsg.l | 529 char *pfile; 537 pfile = altfile; 539 pfile = file; 542 n = sscanf(str, "%c%d%s", &ch, &line, pfile); 545 len = strlen(pfile) - 2; 547 pfile++; 548 if (n == 3 && (strncmp(pfile, srcfile, len) == 0)) {
|
/illumos-gate/usr/src/cmd/sgs/gprof/common/ |
H A D | gprof.c | 1372 readarcs(FILE *pfile) in readarcs() argument 1392 sizeof (L_cgarc64), 1, pfile) != 1) in readarcs() 1411 sizeof (L_cgarc), 1, pfile) != 1) in readarcs() 1426 pfile) != 1) { in readarcs() 1437 1, pfile) != 1) in readarcs() 1462 readsamples(FILE *pfile) in readsamples() argument 1479 (void) fread(&sample, sizeof (unsigned_UNIT), 1, pfile); in readsamples() 1480 if (feof(pfile)) in readsamples() 1493 handle_versioned(FILE *pfile, char *filename, size_t *fsz) in handle_versioned() argument 1506 if (fread(&prof_hdr, sizeof (ProfHeader), 1, pfile) == 0) { in handle_versioned() [all …]
|
/illumos-gate/usr/src/lib/libshare/common/ |
H A D | libshare_zfs.c | 1110 FILE *pfile; in sa_zfs_set_sharenfs() local 1132 pfile = popen(command, "r"); in sa_zfs_set_sharenfs() 1133 if (pfile != NULL) { in sa_zfs_set_sharenfs() 1134 ret = pclose(pfile); in sa_zfs_set_sharenfs() 1221 FILE *pfile; in sa_zfs_set_sharesmb() local 1249 pfile = popen(command, "r"); in sa_zfs_set_sharesmb() 1250 if (pfile != NULL) { in sa_zfs_set_sharesmb() 1251 ret = pclose(pfile); in sa_zfs_set_sharesmb() 1280 FILE *pfile; in sa_zfs_update() local 1347 pfile = popen(command, "r"); in sa_zfs_update() [all …]
|
/illumos-gate/usr/src/cmd/sgs/unifdef/common/ |
H A D | unifdef.c | 72 static void pfile(void); 153 pfile(); in main() 162 pfile(); in main() 203 pfile(void) in pfile() function
|
/illumos-gate/usr/src/lib/libcryptoutil/common/ |
H A D | config_parsing.c | 47 FILE *pfile; in get_pkcs11conf_info() local 56 if ((pfile = fopen(_PATH_PKCS11_CONF, "rF")) == NULL) { in get_pkcs11conf_info() 61 while (fgets(buffer, BUFSIZ, pfile) != NULL) { in get_pkcs11conf_info() 97 (void) fclose(pfile); in get_pkcs11conf_info()
|
/illumos-gate/usr/src/lib/libkmf/libkmf/common/ |
H A D | policy.c | 1038 FILE *pfile, *tmpfile; in update_policyfile() local 1048 if ((pfile = fopen(filename, "r+")) == NULL && errno == ENOENT) in update_policyfile() 1049 pfile = fopen(filename, "w+"); in update_policyfile() 1051 if (pfile == NULL) in update_policyfile() 1054 if (lockf(fileno(pfile), F_TLOCK, 0) == -1) { in update_policyfile() 1055 (void) fclose(pfile); in update_policyfile() 1094 (void) fclose(pfile); in update_policyfile() 1102 (void) fclose(pfile); in update_policyfile() 1108 (void) fclose(pfile); in update_policyfile()
|
H A D | generalop.c | 2714 FILE *pfile; in get_entrylist() local 2722 if ((pfile = fopen(_PATH_KMF_CONF, "rF")) == NULL) { in get_entrylist() 2727 while (fgets(buffer, MAXPATHLEN, pfile) != NULL) { in get_entrylist() 2760 (void) fclose(pfile); in get_entrylist()
|
/illumos-gate/usr/src/cmd/svc/svccfg/ |
H A D | svccfg_engine.c | 910 manifest_info_t *pfile; in engine_apply() local 968 pfile = *entry; in engine_apply() 970 if (apply_profile(pfile, apply_changes) == 0) { in engine_apply() 973 pfile->mi_path); in engine_apply() 977 pfile->mi_path); in engine_apply()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/wificonfig/ |
H A D | wificonfig.c | 181 static config_file_t *parse_file(const char *pfile); 774 parse_file(const char *pfile) in parse_file() argument 786 assert(pfile != NULL); in parse_file() 792 file = fopen(pfile, "r"); in parse_file() 795 fd = open(pfile, O_CREAT|O_EXCL|O_RDWR, 0600); in parse_file() 798 "\n"), gExecName, pfile); in parse_file() 802 (void) chmod(pfile, S_IRUSR); in parse_file() 821 gExecName, pfile, WIFI_PREFER); in parse_file() 833 gExecName, pfile, WIFI_HISTORY); in parse_file() 845 gExecName, pfile, WIFI_ACTIVEP); in parse_file() [all …]
|