HomeSort by: relevance | last modified time | path
    Searched refs:nread (Results 1 - 25 of 68) sorted by relevancy

1 2 3

  /src/tests/compat/linux/
h_inotify_watch_change.c 45 ssize_t nread; local in function:_start
58 RS(nread = read(fd, events, sizeof(events)));
59 REQUIRE(nread == sizeof(events[0]));
70 RS(nread = read(fd, events, sizeof(events)));
71 REQUIRE(nread == sizeof(events[0]));
82 RS(nread = read(fd, events, sizeof(events)));
83 REQUIRE(nread == 2 * sizeof(events[0]));
  /src/usr.bin/vndcompress/
utils.c 67 ssize_t nread = 0; local in function:read_block
69 while (0 < n && (nread = read(fd, p, n)) != 0) {
70 if (nread == -1)
72 p += MIN(n, (size_t)nread);
73 n -= MIN(n, (size_t)nread);
77 assert(n == 0 || nread == 0); /* complete read or EOF */
91 ssize_t nread = 0; local in function:pread_block
97 while (0 < n && (nread = pread(fd, p, n, fdpos)) != 0) {
98 if (nread == -1)
100 fdpos += MIN(n, (size_t)nread);
    [all...]
  /src/tests/lib/libcurses/slave/
slave.c 57 ssize_t nread = read(from_director, data, n); local in function:try_read_from_director
58 if (nread < 0)
60 if (nread == 0)
62 if ((size_t)nread != n)
64 n, (size_t)nread);
71 ssize_t nread = read(from_director, data, n); local in function:read_from_director
72 if (nread < 0)
74 if ((size_t)nread != n)
76 n, (size_t)nread);
  /src/sys/rump/librump/rumpkern/
hyperentropy.c 45 size_t n, nread; local in function:feedrandom
51 RUMPUSER_RANDOM_HARD|RUMPUSER_RANDOM_NOWAIT, &nread)
54 n += MIN(nread, bytes - n);
  /src/usr.bin/sdiff/
edit.c 73 size_t nread, nwritten; local in function:eparse
155 for (nread = sizeof(buf); nread == sizeof(buf);) {
156 nread = fread(buf, sizeof(*buf), sizeof(buf), file);
158 if (nread != sizeof(buf) &&
168 if (!nread)
172 nwritten = fwrite(buf, sizeof(*buf), nread, outfile);
173 if (nwritten != nread) {
  /src/games/caesar/
caesar.c 131 size_t i, nread; local in function:guess_and_rotate
143 for (nread = 0; nread < sizeof(inbuf); nread++) {
146 inbuf[nread] = (unsigned char)ch;
149 for (i = 0; i < nread; i++)
172 print_array(inbuf, nread);
  /src/sys/lib/libsa/
cd9660.c 141 size_t buf_size, nread, psize, dsize; local in function:cd9660_open
157 ISO_DEFAULT_BLOCK_SIZE, buf, &nread);
160 if (nread != ISO_DEFAULT_BLOCK_SIZE) {
188 buf_size, buf, &nread);
191 if (nread != buf_size) {
245 buf, &nread);
248 if (nread != ISO_DEFAULT_BLOCK_SIZE) {
317 size_t nread, off; local in function:cd9660_read
333 ISO_DEFAULT_BLOCK_SIZE, dp, &nread);
336 if (nread != ISO_DEFAULT_BLOCK_SIZE
    [all...]
  /src/usr.bin/tcopy/
tcopy.c 79 ssize_t lastnread, nread; local in function:main
153 if ((nread = read(inp, buff, maxblk)) == -1) {
155 nread = read(inp, buff, maxblk);
156 if (nread >= 0)
161 } else if (nread != lastnread) {
163 if (lastrec == 0 && nread == 0)
171 if (nread != 0)
173 filen, (long)nread);
178 if (nread > 0) {
184 nw = write(outp, buff, nread);
    [all...]
  /src/sys/arch/shark/stand/ofwboot/
ofdev.c 188 size_t nread; local in function:search_label
194 if (strategy(devp, F_READ, off, DEV_BSIZE, buf, &nread)
195 || nread != DEV_BSIZE)
214 DEV_BSIZE, buf, &nread) == 0
215 && nread == DEV_BSIZE) {
221 if (strategy(devp, F_READ, off, DEV_BSIZE, buf, &nread)
222 || nread != DEV_BSIZE) {
232 if (strategy(devp, F_READ, off, DEV_BSIZE, buf, &nread)
233 || nread != DEV_BSIZE) {
252 size_t nread; local in function:devopen
    [all...]
  /src/usr.bin/tip/aculib/
ventel.c 208 int already = 0, nread; local in function:vensync
232 if (ioctl(fd, FIONREAD, &nread) < 0) {
236 while (nread > 0) {
237 (void)read(fd, buf, min(nread, sizeof buf));
238 if ((buf[min(nread, sizeof buf) - 1] & 0177) == '$')
240 nread -= min(nread, 60);
  /src/tests/lib/libc/stdlib/
h_sort.c 94 ssize_t nread; local in function:main
140 while ((nread = read(STDIN_FILENO, buf + off, nbuf - off - 1)) != 0) {
141 if (nread == -1)
143 if ((size_t)nread > nbuf - off - 1)
144 errx(1, "overlong read: %zu", (size_t)nread);
145 if (memchr(buf + off, '\0', (size_t)nread) != NULL)
147 off += (size_t)nread;
  /src/tests/kernel/
t_execregs.c 53 ssize_t nread; local in function:readregs
58 RL(nread = read(rfd, p, n));
59 ATF_CHECK_MSG((size_t)nread <= n,
60 "overlong read: %zu > %zu", (size_t)nread, n);
61 if (nread == 0)
63 p += (size_t)nread;
64 n -= (size_t)nread;
t_fdrestart.c 74 ssize_t nread; local in function:doread
86 nread = rump_sys_read(F->fd, &c, sizeof(c));
87 ATF_REQUIRE_EQ_MSG(nread, -1, "nread=%zd", nread);
96 nread = rump_sys_read(F->fd, &c, sizeof(c));
97 ATF_REQUIRE_EQ_MSG(nread, -1, "nread=%zd", nread);
  /src/lib/libc/stdio/
vfscanf.c 152 nread++, fp->_r--, fp->_p++; \
170 size_t nread; /* number of characters consumed from fp */ local in function:__svfscanf_unlocked_l
190 nread = 0;
199 nread++, fp->_r--, fp->_p++;
220 nread++;
334 *va_arg(ap, char *) = (char)nread;
336 *va_arg(ap, short *) = (short)nread;
338 *va_arg(ap, long *) = nread;
340 *va_arg(ap, long long *) = nread;
342 *va_arg(ap, intmax_t *) = nread;
    [all...]
vfwscanf.c 160 size_t nread; /* number of characters consumed from fp */ local in function:__vfwscanf_unlocked_l
178 nread = 0;
215 nread++;
340 *va_arg(ap, char *) = (char)nread;
342 *va_arg(ap, short *) = (short)nread;
344 *va_arg(ap, long *) = nread;
346 *va_arg(ap, quad_t *) = nread;
348 *va_arg(ap, intmax_t *) = nread;
350 *va_arg(ap, size_t *) = nread;
352 *va_arg(ap, ptrdiff_t *) = nread;
    [all...]
  /src/sys/arch/ia64/stand/common/
misc.c 126 ssize_t nread; local in function:kern_pread
132 nread = archsw.arch_readin(fd, dest, len);
133 if (nread != len) {
148 ssize_t nread; local in function:alloc_pread
160 nread = read(fd, buf, len);
161 if (nread != len) {
162 printf("\nread failed\n");
  /src/sys/arch/macppc/stand/ofwboot/
ofdev.c 188 size_t nread; local in function:search_mac_label
197 if (strategy(devp, F_READ, blkno, DEV_BSIZE, pme, &nread)
198 || nread != DEV_BSIZE)
238 size_t nread; local in function:search_dos_label
244 if (strategy(devp, F_READ, off, DEV_BSIZE, buf, &nread)
245 || nread != DEV_BSIZE)
264 DEV_BSIZE, buf, &nread) == 0
265 && nread == DEV_BSIZE) {
271 if (strategy(devp, F_READ, off, DEV_BSIZE, buf, &nread)
272 || nread != DEV_BSIZE)
390 size_t nread; local in function:devopen
    [all...]
  /src/lib/libedit/
read.c 452 noedit_wgets(EditLine *el, int *nread)
471 *nread = (int)(lp->lastchar - lp->buffer);
472 return *nread ? lp->buffer : NULL;
476 el_wgets(EditLine *el, int *nread)
484 if (nread == NULL)
485 nread = &nrb;
486 *nread = 0;
491 return noedit_wgets(el, nread);
502 *nread = 0;
516 return noedit_wgets(el, nread);
    [all...]
  /src/usr.bin/hexdump/
display.c 239 int need, nread; local in function:get
251 for (need = blocksize, nread = 0;;) {
261 !memcmp(curp, savp, nread)) {
266 memset((char *)curp + nread, 0, need);
267 eaddress = address + nread;
270 n = fread((char *)curp + nread, sizeof(u_char),
293 nread = 0;
296 nread += n;
  /src/sbin/gpt/
gpt_uuid.c 281 ssize_t nread; local in function:gpt_uuid_random
289 for (p = (uint8_t *)u; n > 0; p += nread, n -= (size_t)nread) {
290 nread = read(fd, p, n);
291 if (nread < 0) {
295 if (nread == 0) {
299 if ((size_t)nread > n) {
300 gpt_warnx(gpt, "read too much: %zd > %zu", nread, n);
  /src/sys/arch/hpc/stand/hpcboot/
file_manager.cpp 206 size_t nread = _read(dummybuf, toread); local in function:FileManager::_skip_compressed
207 if ((int)nread < 0)
208 return nread;
210 toskip -= nread;
211 skipped += nread;
213 if (nread != toread)
  /src/usr.bin/audio/record/
record.c 92 ssize_t nread; local in function:main
357 if ((nread = read(audiofd, buffer, bufsize)) == -1)
359 if (nread == 0)
362 (*conv_func)(buffer, nread);
363 if (write(ti.outfd, buffer, nread) != nread)
365 ti.total_size += nread;
  /src/sys/dev/ic/
tpm.c 144 size_t nread; local in function:tpm12_suspend
186 error = (*sc->sc_intf->read)(sc, &response, sizeof(response), &nread,
192 if (nread != sizeof(response)) {
193 device_printf(sc->sc_dev, "short header read: %zu\n", nread);
243 size_t nread; local in function:tpm20_suspend
285 error = (*sc->sc_intf->read)(sc, &response, sizeof(response), &nread,
291 if (nread != sizeof(response)) {
292 device_printf(sc->sc_dev, "short header read: %zu\n", nread);
503 size_t nread; local in function:tpm12_rng
541 &nread, 0)) != 0)
643 size_t nread; local in function:tpm20_rng
    [all...]
  /src/bin/mv/
mv.c 279 ssize_t nread; local in function:fastcopy
299 while ((nread = read(from_fd, bp, blen)) > 0) {
300 if (write(to_fd, bp, nread) != nread) {
304 total += nread;
314 if (nread < 0) {
  /src/usr.bin/csplit/
csplit.c 310 size_t i, nread; local in function:toomuch
343 if ((nread = fread(buf, 1, sizeof(buf), ofp)) == 0)
345 if (fseeko(ofp, -(off_t)nread, SEEK_CUR) != 0)
347 for (i = 1; i <= nread; i++)
348 if (buf[nread - i] == '\n' && n-- == 0)
353 if (fseeko(ofp, (off_t)nread - i + 1, SEEK_CUR) != 0)

Completed in 26 milliseconds

1 2 3