/* Translate a host's stat struct into a target's.
BIG_P is non-zero if the target is big-endian.
- The result is the size of the target's stat struct. */
+ The result is the size of the target's stat struct,
+ or zero if an error occured during the translation. */
int
cb_host_to_target_stat (cb, hs, ts, big_p)
if (q == NULL)
{
/* FIXME: print error message */
- return;
+ return 0;
}
size = atoi (q + 1);
if (size == 0)
{
/* FIXME: print error message */
- return;
+ return 0;
}
if (strncmp (m, "st_dev", q - m) == 0)
if (m)
++m;
}
+
+ return p - (char *) ts;
}
\f
/* Cover functions to the vfprintf callbacks.