/* Utility for stat and fstat */
int stcpy(inoptr ino, char *buf)
{
+ static uint8_t zero[4];
/* Copying the structure a member at a time is too expensive. Instead we
* copy sequential runs of identical types (the only members which the
* compiler guarantees are next to each other). */
/* VIRTUAL: If we ever do true virtual memory we'll need to copy the
structure first or we may sleep and copy bits from different inode
states */
- uint32_t zero = 0;
struct _uzistat* st = (struct _uzistat*) buf;
int err = uput(&ino->c_dev, &st->st_dev, 2 * sizeof(uint16_t));
err |= uput(&ino->c_node.i_mode, &st->st_mode, 4 * sizeof(uint16_t));
err |= uput(&ino->c_node.i_addr[0], &st->st_rdev, 1 * sizeof(uint16_t));
err |= uput(&ino->c_node.i_size, &st->st_size, 4 * sizeof(uint32_t));
- err |= uput(&zero, &st->st_timeh, 1 * sizeof(uint32_t));
+ err |= uput(zero, &st->st_timeh, 4);
return err;
}