source: rtems/cpukit/libfs/src/devfs/devstat.c @ 339069fc

5
Last change on this file since 339069fc was 339069fc, checked in by Sebastian Huber <sebastian.huber@…>, on Dec 13, 2017 at 7:02:09 AM

devfs: Include <rtems/devfs.h>

Prepare for header file move to common include directory.

Update #3254.

  • Property mode set to 100644
File size: 731 bytes
Line 
1/**
2 * @file
3 *
4 * @brief Gets the Device File Information
5 * @ingroup DevFsDeviceTable Define Device Table Type
6 */
7
8/*
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.org/license/LICENSE.
12 */
13
14#if HAVE_CONFIG_H
15  #include "config.h"
16#endif
17
18#include <rtems/devfs.h>
19
20int devFS_stat(
21  const rtems_filesystem_location_info_t *loc,
22  struct stat *buf
23)
24{
25  int rv = 0;
26  const devFS_node *the_dev = loc->node_access;
27
28  if (the_dev != NULL) {
29    buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
30    buf->st_mode = the_dev->mode;
31  } else {
32    rv = rtems_filesystem_default_fstat(loc, buf);
33  }
34
35  return rv;
36}
Note: See TracBrowser for help on using the repository browser.