search for: write_rec

Displaying 1 result from an estimated 1 matches for "write_rec".

Did you mean: write_reg
2005 Feb 19
0
[PATCH] check read/write return values
...t;Could not allocate decompression state for state file"); --- xen-unstable/tools/xentrace/xentrace.c.warn 2005-02-19 12:31:19.994379665 -0500 +++ xen-unstable/tools/xentrace/xentrace.c 2005-02-19 12:37:11.425091593 -0500 @@ -77,8 +77,14 @@ struct timespec millis_to_timespec(unsig */ void write_rec(unsigned int cpu, struct t_rec *rec, FILE *out) { - fwrite(&cpu, sizeof(cpu), 1, out); - fwrite(rec, sizeof(*rec), 1, out); + size_t written = 0; + written += fwrite(&cpu, sizeof(cpu), 1, out); + written += fwrite(rec, sizeof(*rec), 1, out); + if ( written != 2 ) + {...