File: fs.h

package info (click to toggle)
pmount 0.8-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 340 kB
  • ctags: 95
  • sloc: ansic: 1,396; makefile: 48; sh: 24
file content (39 lines) | stat: -rw-r--r-- 1,241 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
 * fs.h - data type and interface function for supported file systems
 *
 * Author: Martin Pitt <martin.pitt@canonical.com>
 * (c) 2004 Canonical Ltd.
 * 
 * This software is distributed under the terms and conditions of the 
 * GNU General Public License. See file GPL for the full text of the license.
 */

#ifndef __fs_h
#define __fs_h

/**
 * Structure with information about a supported file system
 */
struct FS {
    const char* fsname;    /* file system name (e. g. 'ext2') */
    const char* options;   /* standard mount options (must not be empty) */
    int support_ugid;      /* whether the fs supports uid and gid options */
    const char* umask;     /* umask value (NULL if umask is not supported) */
    int support_iocharset; /* whether the fs supports the iocharset option */
};

/**
 * Return the information struct for a given file system, or NULL if the file
 * system is unknown. The returned pointer points to static data, do not free()
 * it.
 */
const struct FS* get_fs_info( const char* fsname );

/**
 * Return an array of supported file systems for iteration. The returned array
 * is terminated with an FS struct with fsname == NULL.
 */
const struct FS* get_supported_fs();

#endif /* !defined( __fs_h) */