/illumos-gate/usr/src/lib/libcmd/common/ |
H A D | tail.c | 154 tailpos(register Sfio_t* fp, register Sfoff_t number, int delim) argument 164 last = sfsize(fp); 165 if ((first = sfseek(fp, (Sfoff_t)0, SEEK_CUR)) < 0) 166 return last || fstat(sffileno(fp), &st) || st.st_size || FIFO(st.st_mode) ? -1 : 0; 177 sfseek(fp, offset, SEEK_SET); 179 if (!(s = sfreserve(fp, n, SF_LOCKR))) 185 sfread(fp, s, 0); 188 sfread(fp, s, 0); 423 register Tail_t* fp; local 613 if (!(fp [all...] |
/illumos-gate/usr/src/lib/libldap5/sources/ldap/common/ |
H A D | disptmpl.c | 108 FILE *fp; local 115 if (( fp = fopen( file, "rF" )) == NULL ) { 119 if ( fseek( fp, 0L, SEEK_END ) != 0 ) { /* move to end to get len */ 120 fclose( fp ); 124 len = ftell( fp ); 126 if ( fseek( fp, 0L, SEEK_SET ) != 0 ) { /* back to start of file */ 127 fclose( fp ); 132 fclose( fp ); 136 rlen = fread( buf, 1, (size_t)len, fp ); 137 eof = feof( fp ); [all...] |
/illumos-gate/usr/src/cmd/vi/port/ |
H A D | ex_io.c | 159 unsigned char *cp, *fp; local 227 fp = (unsigned char *)altfile; 228 if (*fp == 0) 235 fp = savedfile; 236 if (*fp == 0) 241 while (*fp) { 244 *cp++ = *fp++; 701 unsigned char *fp; local 704 fp = nextip; 727 fp 754 unsigned char *fp; local [all...] |
/illumos-gate/usr/src/common/ctf/ |
H A D | ctf_open.c | 111 init_symtab(ctf_file_t *fp, const ctf_header_t *hp, argument 115 uint_t *xp = fp->ctf_sxlate; 116 uint_t *xend = xp + fp->ctf_nsyms; 170 info = *(ushort_t *)((uintptr_t)fp->ctf_buf + funcoff); 171 vlen = LCTF_INFO_VLEN(fp, info); 178 if (LCTF_INFO_KIND(fp, info) == CTF_K_UNKNOWN && 191 ctf_dprintf("loaded %lu symtab entries\n", fp->ctf_nsyms); 200 init_types(ctf_file_t *fp, const ctf_header_t *cth) argument 203 const ctf_type_t *tbuf = (ctf_type_t *)(fp->ctf_buf + cth->cth_typeoff); 205 const ctf_type_t *tend = (ctf_type_t *)(fp 549 ctf_file_t *fp; local 800 ctf_file_t *fp; local 883 ctf_close(ctf_file_t *fp) argument 967 ctf_parent_file(ctf_file_t *fp) argument 977 ctf_parent_name(ctf_file_t *fp) argument 988 ctf_import(ctf_file_t *fp, ctf_file_t *pfp) argument 1012 ctf_setmodel(ctf_file_t *fp, int model) argument 1030 ctf_getmodel(ctf_file_t *fp) argument 1036 ctf_setspecific(ctf_file_t *fp, void *data) argument 1042 ctf_getspecific(ctf_file_t *fp) argument [all...] |
/illumos-gate/usr/src/common/fs/ |
H A D | pcfs.c | 72 #define FI_STARTCLUST(fp) (*(ushort_t *)(fp)->fi_buf) 73 #define FI_LENGTH(fp) (*(long *)((fp)->fi_buf + 4)) 283 fileid_t *fp; local 287 fp = find_fp(fd); 288 if (fp == NULL) { 294 off = fp->fi_offset; 295 blk = FI_STARTCLUST(fp); 299 off = fp 418 uchar_t *fp; local [all...] |
/illumos-gate/usr/src/grub/grub-0.97/lib/ |
H A D | device.c | 446 FILE *fp; local 452 fp = fopen (device, "r"); 453 if (! fp) 481 if (ioctl (fileno (fp), CDROM_GET_CAPABILITY, 0) >= 0) 489 if (fstat (fileno (fp), &st)) 496 && ioctl (fileno (fp), HDIO_GETGEO, &hdg)) 504 if (ioctl (fileno (fp), CDIOCCLRDEBUG, 0) >= 0) 510 if (fread (buf, 1, 512, fp) != 512) 512 fclose (fp); 516 fclose (fp); 522 read_device_map(FILE *fp, char **map, const char *map_file) argument 651 FILE *fp = 0; local [all...] |
/illumos-gate/usr/src/cmd/newform/ |
H A D | newform.c | 141 FILE *fp; /* Pointer to current file */ local 153 if ((fp = fopen(scan, "r")) == NULL) { 158 process(fp); 159 (void) fclose(fp); 327 FILE *fp; /* File pointer */ local 555 if ((fp = fopen(filep, "r")) == NULL) { 560 (void) readline(fp, work); 561 (void) fclose(fp); 636 readline(FILE *fp, char *area) /* Read one line from the file. */ argument 637 /* fp 691 process(FILE *fp) argument [all...] |
/illumos-gate/usr/src/cmd/picl/plugins/sun4u/daktari/psvcplugin/ |
H A D | psvcplugin.c | 77 FILE *fp; member in struct:handle 111 static int32_t count_records(FILE *fp, char *end, uint32_t *countp) argument 118 first_record = ftell(fp); 120 while ((ret = fgets(buf, BUFSZ, fp)) != NULL) { 131 fseek(fp, first_record, SEEK_SET); 298 load_projected_properties(FILE *fp) argument 312 if (find_file_section(fp, "PROJECTED_PROPERTIES") != 0) 315 if (count_records(fp, "PROJECTED_PROPERTIES_END", 323 fgets(buf, BUFSZ, fp); 464 load_projected_properties(psvc_hdl.fp); [all...] |
/illumos-gate/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/ |
H A D | fcal_leds.c | 145 FILE *fp = NULL; local 153 fp = fopen(fname, "r"); 154 if (fp == NULL) { 157 return (fp); 521 FILE *fp; local 524 if ((fp = open_config()) == NULL) 526 if (fc_led_parse(fp, &g_led_dtls) != 0) { 527 (void) fclose(fp); 530 (void) fclose(fp);
|
/illumos-gate/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/ |
H A D | picldr.c | 107 FILE *fp; local 112 if ((fp = fopen(conffile, "r")) == NULL) { 115 while (fgets(buf, sizeof (buf), fp) != NULL) { 148 (void) fclose(fp); 152 (void) fclose(fp);
|
/illumos-gate/usr/src/cmd/print/bsd-sysv-commands/ |
H A D | in.lpd.c | 54 #define ACK(fp) { (void) fputc('\0', fp); (void) fflush(fp); } 55 #define NACK(fp) { (void) fputc('\1', fp); (void) fflush(fp); } 63 remote_host_name(FILE *fp) argument 68 int fd = fileno(fp); 98 fatal(FILE *fp, char *fmt, ...) argument 104 vfprintf(fp, fm [all...] |
/illumos-gate/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/ |
H A D | NS.c | 42 void f_cleanup(FILE *fp, char *tmpf); 197 f_cleanup(FILE *fp, char *tmpf) argument 199 if (fp != NULL) { 200 (void) fclose(fp);
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.ripngd/ |
H A D | tables.c | 527 rtdumpentry(FILE *fp, struct rt_entry *rt) argument 552 (void) fprintf(fp, "prefix %s/%d ", 555 (void) fprintf(fp, "via %s metric %d timer %d", 559 (void) fprintf(fp, " if %s", 563 (void) fprintf(fp, " state"); 568 (void) fprintf(fp, "%c%s", c, p->t_name); 575 (void) fprintf(fp, " 0"); 581 (void) fprintf(fp, "%c%s", c, p->t_name); 588 (void) putc('\n', fp); 589 (void) fflush(fp); 593 rtdump2(FILE *fp) argument [all...] |
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/in.routed/ |
H A D | parms.c | 216 FILE *fp; local 231 fp = fopen(PATH_GATEWAYS, "r"); 232 if (fp == NULL) 235 if (0 > fstat(fileno(fp), &sb)) { 238 (void) fclose(fp); 243 if (NULL == fgets(lbuf, sizeof (lbuf), fp)) 426 (void) fclose(fp);
|
/illumos-gate/usr/src/cmd/cron/ |
H A D | crontab.c | 126 FILE *fp, *tmpfp; local 239 if ((fp = fopen(cf, "r")) == NULL) 241 while (fgets(line, CTLINESIZE, fp) != NULL) 243 fclose(fp); 247 if ((fp = fopen(cf, "r")) == NULL) { 269 if (fp != NULL) { 273 while (fgets(line, CTLINESIZE, fp) != NULL) { 276 fclose(fp); 282 if (ferror(fp)) { 283 fclose(fp); [all...] |
/illumos-gate/usr/src/cmd/csh/ |
H A D | sh.proc.c | 52 struct process *fp; local 109 fp = pp; 111 if ((fp->p_flags & (PPTIME|PRUNNING|PSTOPPED)) == 0 && 113 fp->p_rusage.ru_utime.tv_sec+fp->p_rusage.ru_stime.tv_sec >= 115 fp->p_flags |= PTIME; 116 jobflags |= fp->p_flags; 117 } while ((fp = fp->p_friends) != pp); 124 fp 190 struct process *fp, *pp; local 221 struct process *fp; local 434 struct process *fp; local [all...] |
/illumos-gate/usr/src/cmd/cvcd/sparc/sun4u/starcat/ |
H A D | cvcd.c | 870 FILE *fp; local 874 fp = fopen("/etc/inet/ipsecinit.conf", "r"); 875 if (fp == NULL) 877 while (fgets(buf, sizeof (buf), fp) != NULL) { 886 (void) fclose(fp);
|
/illumos-gate/usr/src/cmd/diff3/ |
H A D | diff3prog.c | 82 static FILE *fp[3]; variable 162 if ((fp[i] = fopen(argv[i+3], "r")) == NULL) { 190 if ((fp[0] = fopen(name, "r")) == NULL) { 197 for (i = 0; getchange(fp[0]); i++) { 227 (void) fclose(fp[0]); 454 if ((j = getaline(fp[i])) == 0) 481 c = getc(fp[0]); 482 d = getc(fp[1]); 501 (void) fseek(fp[i], (long)-nchar, 1); 541 (void) fseek(fp[ [all...] |
/illumos-gate/usr/src/cmd/mailx/ |
H A D | send.c | 51 static void statusput(register struct message *mp, register FILE *obuf, int doign, int (*fp)(const char *, FILE *)); 63 * Call (*fp)(line, obuf) to print the line. 70 int (*fp)(const char *, FILE *)) 115 statusput(mailp, obuf, doign, fp); 123 (*fp)(field, obuf); 149 statusput(mailp, obuf, doign, fp); 152 (*fp)("\n", obuf); 176 statusput(mailp, obuf, doign, fp); 186 (*fp)(line, obuf); 221 (*fp)(lin 408 FILE *mtf, *fp; local [all...] |
/illumos-gate/usr/src/cmd/mdb/intel/kmdb/ |
H A D | kvm_isadep.c | 88 kreg_t pc, sp, fp; local 92 (void) kmdb_dpi_get_register("fp", &fp); 101 return (mdb_isa_step_out(t, p, pc, fp, sp, instr));
|
/illumos-gate/usr/src/cmd/modload/ |
H A D | plcysubr.c | 107 fgetline(FILE *fp) argument 132 while (lastc = c, (c = getc(fp)) != EOF) { 231 put_minor_range(FILE *fp, fileentry_t *old, const char *devn, const char *tail, argument 236 (void) fwrite(old->rawbuf, 1, old->orgentry - old->rawbuf, fp); 239 put_minor_range(fp, NULL, devn, tail, lo, hi, 'b'); 240 put_minor_range(fp, NULL, devn, tail, lo, hi, 'c'); 242 (void) fprintf(fp, "%s:(%d)%c%s", devn, (int)lo, type, tail); 244 (void) fprintf(fp, "%s:(%d-%d)%c%s", devn, (int)lo, (int)hi, 629 FILE *fp; local 658 fp [all...] |
/illumos-gate/usr/src/cmd/ndmpadm/ |
H A D | ndmpadm_main.c | 166 FILE *fp = requested ? stdout : stderr; local 169 (void) fprintf(fp, 171 (void) fprintf(fp, 175 (void) fprintf(fp, "%s", 178 (void) fprintf(fp, gettext("\t\twhere %s can be either " 181 (void) fprintf(fp, gettext("Usage:\n")); 182 (void) fprintf(fp, "%s", get_usage(current_command->nc_usage)); 185 (void) fprintf(fp, gettext("\t\twhere %s can be either " 195 (void) fprintf(fp, 198 (void) fprintf(fp, gettex [all...] |
/illumos-gate/usr/src/cmd/eject/ |
H A D | eject.c | 461 FILE *fp = NULL; /* for scanning mnttab */ local 485 if ((fp = fopen(MNTTAB, "r")) == NULL) { 492 if (getmntany(fp, &mp, &mref) == 0) { 510 rewind(fp); /* rescan mnttab */ 511 while (getmntent(fp, &mp) == 0) { 526 if (fp != NULL) { 527 (void) fclose(fp);
|
/illumos-gate/usr/src/cmd/file/ |
H A D | magicutils.c | 228 FILE *fp; local 258 if ((fp = fopen(magfile, "r")) == NULL) { 264 while (fgets(buf, BSZ, fp) != NULL) { 521 if (fclose(fp) != 0) {
|
/illumos-gate/usr/src/cmd/fm/schemes/mem/sparc/ |
H A D | mem_disc.c | 299 FILE *fp; local 304 if ((fp = fopen(confpath, "r")) == NULL) 308 for (line = 1; fgets(buf, sizeof (buf), fp) != NULL; line++) { 325 (void) fclose(fp); 333 (void) fclose(fp);
|