/*
 * See NaClHostDescStat below.
 */
int NaClHostDescFstat(struct NaClHostDesc  *d,
                      nacl_host_stat_t     *nhsp) {
  NaClHostDescCheckValidity("NaClHostDescFstat", d);
  if (NACL_HOST_FSTAT64(d->d, nhsp) == -1) {
    return -NaClXlateErrno(errno);
  }

  return 0;
}
static void NaClFileLockManagerSetFileIdentityData(
    struct NaClFileLockEntry *entry,
    int desc) {
  nacl_host_stat_t stbuf;
  if (0 != NACL_HOST_FSTAT64(desc, &stbuf)) {
    NaClLog(LOG_FATAL,
            "NaClFileLockManagerSetFileIdentityData: fstat failed, desc %d,"
            " errno %d\n", desc, errno);
  }
  entry->file_dev = stbuf.st_dev;
  entry->file_ino = stbuf.st_ino;
}