MCPcopy Create free account
hub / github.com/coreutils/coreutils / write_output

Function write_output

src/dd.c:1248–1263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1246/* Write, then empty, the output buffer 'obuf'. */
1247
1248static void
1249write_output (void)
1250{
1251 idx_t nwritten = iwrite (STDOUT_FILENO, obuf, output_blocksize);
1252 w_bytes += nwritten;
1253 if (nwritten != output_blocksize)
1254 {
1255 diagnose (errno, _("writing to %s"), quoteaf (output_file));
1256 if (nwritten != 0)
1257 w_partial++;
1258 quit (EXIT_FAILURE);
1259 }
1260 else
1261 w_full++;
1262 oc = 0;
1263}
1264
1265/* Restart on EINTR from fdatasync. */
1266

Callers 1

copy_simpleFunction · 0.85

Calls 3

iwriteFunction · 0.85
diagnoseFunction · 0.85
quitFunction · 0.85

Tested by

no test coverage detected