Welcome to mirror list, hosted at ThFree Co, Russian Federation.

semihost-sys_fstat.c « riscv « libgloss - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f57f0c07fd29a6a0bb1425b0a6dff637c886ba35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Copyright (C) 2020 Embecosm Limited
 * SPDX-License-Identifier: BSD-2-Clause
 */
#include <string.h>
#include <sys/stat.h>
#include "semihost_stat.h"

/* Status of an open file.  The sys/stat.h header file required is
   distributed in the include subdirectory for this C library.  */

int
_fstat (int file, struct stat *st)
{
  /* Initialize st as not all fields will be set.  */
  memset (st, 0, sizeof (*st));

  return __stat_common (file, st);
}