• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/file_cmds-230/dd/

Lines Matching defs:in

9  * Redistribution and use in source and binary forms, with or without
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
82 IO in, out; /* input/output state */
117 if (in.name == NULL) {
118 in.name = "stdin";
119 in.fd = STDIN_FILENO;
121 in.fd = open(in.name, O_RDONLY, 0);
122 if (in.fd == -1)
123 err(1, "%s", in.name);
126 getfdtype(&in);
128 if (files_cnt > 1 && !(in.flags & ISTAPE))
159 if ((in.db = malloc(out.dbsz + in.dbsz - 1)) == NULL)
161 out.db = in.db;
162 } else if ((in.db = malloc(MAX(in.dbsz, cbsz) + cbsz)) == NULL ||
165 in.dbp = in.db;
169 if (in.offset)
186 * built-in tables.
282 memset(in.dbp, ' ', in.dbsz);
284 memset(in.dbp, 0, in.dbsz);
287 n = read(in.fd, in.dbp, in.dbsz);
289 in.dbrcnt = 0;
300 err(1, "%s", in.name);
301 warn("%s", in.name);
308 * in sector size chunks.
310 if (in.flags & ISSEEK &&
311 lseek(in.fd, (off_t)in.dbsz, SEEK_CUR))
312 warn("%s", in.name);
319 in.dbcnt += in.dbrcnt = in.dbsz;
323 } else if ((size_t)n == in.dbsz) {
324 in.dbcnt += in.dbrcnt = n;
331 in.dbcnt += in.dbrcnt = in.dbsz;
333 in.dbcnt += in.dbrcnt = n;
343 out.dbcnt = in.dbcnt;
345 in.dbcnt = 0;
350 if ((n = in.dbrcnt) & 1) {
354 swab(in.dbp, in.dbp, (size_t)n);
357 in.dbp += in.dbrcnt;
397 * output block in a single write; increment the full block stats.
404 * write the block in multiple chunks. The original versions of dd(1)
405 * never wrote a block in more than a single write, so the latter case
408 * One special case is if we're forced to do the write -- in that case