Loading...
Searching...
No Matches
fsdev.c File Reference

fsdev API implementation More...

`#include <stdio.h>`
`#include <stddef.h>`
`#include <string.h>`
`#include <ctype.h>`
`#include <stdlib.h>`
`#include <sys/types.h>`
`#include <sys/stat.h>`
`#include <errno.h>`
`#include "fsdev.h"`
`#include "common/util.h"`
Include dependency graph for fsdev.c:

## Functions

fsdev_t * | fsdev_init ()
| Initialize the fsdev_t structure from an array of filesystem names.
void | fsdev_free (fsdev_t *lfs)
| Free the fsdev_t structure.
int | fsdev_search (fsdev_t *lfs, void *id)
| Search an id in the fsdev_t structure.
int | fsdev_path (fsdev_t *lfs, const char *path)
| Check whether a path points points to a place on any of the devices in the fsdev_t structure.
int | fsdev_fd (fsdev_t *lfs, int fd)
| Check whether a file descriptor is associated with a file that resides on any of the devices in the fsdev_t structure.

## Detailed Description

fsdev API implementation

Author
  "Daniel Kopecek" dkope.nosp@m.cek@.nosp@m.redha.nosp@m.t.co.nosp@m.m

## Function Documentation

## fsdev_fd()

int fsdev_fd | ( | fsdev_t * | lfs,
|  | int | fd )

Check whether a file descriptor is associated with a file that resides on any of the devices in the fsdev_t structure.

Parameters

  lfs | pointer to the fsdev_t structure
  fd | file descriptor

Return values

  1 | if found
  0 | otherwise
  -1 | error

## fsdev_path()

int fsdev_path | ( | fsdev_t * | lfs,
|  | const char * | path )

Check whether a path points points to a place on any of the devices in the fsdev_t structure.

Parameters

  lfs | pointer to the fsdev_t structure
  path | path

Return values

  1 | if found
  0 | otherwise
  -1 | error