Changeset View
Changeset View
Standalone View
Standalone View
head/bin/dd/dd.c
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | main(int argc __unused, char *argv[]) | ||||
dd_close(); | dd_close(); | ||||
/* | /* | ||||
* Some devices such as cfi(4) may perform significant amounts | * Some devices such as cfi(4) may perform significant amounts | ||||
* of work when a write descriptor is closed. Close the out | * of work when a write descriptor is closed. Close the out | ||||
* descriptor explicitly so that the summary handler (called | * descriptor explicitly so that the summary handler (called | ||||
* from an atexit() hook) includes this work. | * from an atexit() hook) includes this work. | ||||
*/ | */ | ||||
close(out.fd); | if (close(out.fd) == -1 && errno != EINTR) | ||||
err(1, "close"); | |||||
exit(0); | exit(0); | ||||
} | } | ||||
static int | static int | ||||
parity(u_char c) | parity(u_char c) | ||||
{ | { | ||||
int i; | int i; | ||||
▲ Show 20 Lines • Show All 488 Lines • Show Last 20 Lines |