]> git.decadent.org.uk Git - nfs-utils.git/blob - utils/mount/mount_config.h
mount.nfs: Eliminate compiler warning in utils/mount/mount.c
[nfs-utils.git] / utils / mount / mount_config.h
1 #ifndef _LINUX_MOUNT_CONFIG_H
2 #define _LINUX_MOUNT_CONFIG_H
3 /*
4  * mount_config.h -- mount configuration file routines
5  * Copyright (C) 2008 Red Hat, Inc <nfs@redhat.com>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  */
18
19 #ifdef MOUNT_CONFIG
20 #include "conffile.h"
21 #include "xlog.h"
22
23 extern char *conf_get_mntopts(char *, char *, char *);
24
25 static inline void mount_config_init(char *program)
26 {
27         xlog_open(program);
28         /*
29          * Read the the default mount options
30          */
31         conf_init();
32 }
33
34 static inline char *mount_config_opts(char *spec,
35                 char *mount_point, char *mount_opts)
36 {
37         return conf_get_mntopts(spec, mount_point, mount_opts);
38 }
39
40 #else /* MOUNT_CONFIG */
41
42 static inline void mount_config_init(char *program) { }
43
44 static inline char *mount_config_opts(char *spec,
45                 char *mount_point, char *mount_opts)
46 {
47         return mount_opts;
48 }
49 #endif /* MOUNT_CONFIG */
50
51 #endif  /* _LINUX_MOUNT_CONFIG_H */