am_utils.h (42629) | am_utils.h (51292) |
---|---|
1/* | 1/* |
2 * Copyright (c) 1997-1998 Erez Zadok | 2 * Copyright (c) 1997-1999 Erez Zadok |
3 * Copyright (c) 1990 Jan-Simon Pendry 4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine 5 * Copyright (c) 1990 The Regents of the University of California. 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by 9 * Jan-Simon Pendry at Imperial College, London. 10 * --- 22 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * %W% (Berkeley) %G% 40 * | 3 * Copyright (c) 1990 Jan-Simon Pendry 4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine 5 * Copyright (c) 1990 The Regents of the University of California. 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by 9 * Jan-Simon Pendry at Imperial College, London. 10 * --- 22 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * %W% (Berkeley) %G% 40 * |
41 * $Id: am_utils.h,v 1.2 1998/12/27 06:25:23 ezk Exp $ | 41 * $Id: am_utils.h,v 1.6 1999/08/22 05:12:55 ezk Exp $ |
42 * 43 */ 44 45/* 46 * Definitions that are specific to the am-utils package. 47 */ 48 49#ifndef _AM_UTILS_H --- 72 unchanged lines hidden (view full) --- 122#define PREV(ty, q) ((ty *) (((qelem *) q)->q_back)) 123#define HEAD(ty, q) ((ty *) q) 124#define ITER(v, ty, q) \ 125 for ((v) = AM_FIRST(ty,(q)); (v) != HEAD(ty,(q)); (v) = NEXT(ty,(v))) 126 127/* allocate anything of type ty */ 128#define ALLOC(ty) ((ty *) xmalloc(sizeof(ty))) 129#define CALLOC(ty) ((ty *) xcalloc(1, sizeof(ty))) | 42 * 43 */ 44 45/* 46 * Definitions that are specific to the am-utils package. 47 */ 48 49#ifndef _AM_UTILS_H --- 72 unchanged lines hidden (view full) --- 122#define PREV(ty, q) ((ty *) (((qelem *) q)->q_back)) 123#define HEAD(ty, q) ((ty *) q) 124#define ITER(v, ty, q) \ 125 for ((v) = AM_FIRST(ty,(q)); (v) != HEAD(ty,(q)); (v) = NEXT(ty,(v))) 126 127/* allocate anything of type ty */ 128#define ALLOC(ty) ((ty *) xmalloc(sizeof(ty))) 129#define CALLOC(ty) ((ty *) xcalloc(1, sizeof(ty))) |
130/* simply allocate b bytes */ 131#define SALLOC(b) xmalloc((b)) |
|
130 131/* converting am-filehandles to mount-points */ 132#define fh_to_mp2(fhp, rp) fh_to_mp3(fhp, rp, VLOOK_CREATE) 133 134/* 135 * Systems which have the mount table in a file need to read it before 136 * they can perform an unmount() system call. 137 */ --- 422 unchanged lines hidden (view full) --- 560extern char *strealloc(char *, char *); 561extern char *strip_selectors(char *, char *); 562extern char *strnsave(const char *, int); 563extern fserver *dup_srvr(fserver *); 564extern int amu_close(int fd); 565extern int background(void); 566extern int bind_resv_port(int, u_short *); 567extern int cmdoption(char *, struct opt_tab *, int *); | 132 133/* converting am-filehandles to mount-points */ 134#define fh_to_mp2(fhp, rp) fh_to_mp3(fhp, rp, VLOOK_CREATE) 135 136/* 137 * Systems which have the mount table in a file need to read it before 138 * they can perform an unmount() system call. 139 */ --- 422 unchanged lines hidden (view full) --- 562extern char *strealloc(char *, char *); 563extern char *strip_selectors(char *, char *); 564extern char *strnsave(const char *, int); 565extern fserver *dup_srvr(fserver *); 566extern int amu_close(int fd); 567extern int background(void); 568extern int bind_resv_port(int, u_short *); 569extern int cmdoption(char *, struct opt_tab *, int *); |
570extern int compute_automounter_mount_flags(mntent_t *); |
|
568extern int compute_mount_flags(mntent_t *); 569extern int efs_readdir(am_node *, nfscookie, nfsdirlist *, nfsentry *, int); 570extern int eval_fs_opts(am_opts *, char *, char *, char *, char *, char *); 571extern int fwd_init(void); 572extern int fwd_packet(int, voidp, int, struct sockaddr_in *, struct sockaddr_in *, voidp, fwd_fun); 573extern int get_amd_program_number(void); 574extern int hasmntval(mntent_t *, char *); 575extern int is_network_member(const char *net); --- 59 unchanged lines hidden (view full) --- 635extern void mk_fattr(am_node *, nfsftype); 636extern void mnt_free(mntent_t *); 637extern void mp_to_fh(am_node *, am_nfs_fh *); 638extern void new_ttl(am_node *); 639extern void nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp); 640extern void normalize_slash(char *); 641extern void ops_showamfstypes(char *buf); 642extern void ops_showfstypes(char *outbuf); | 571extern int compute_mount_flags(mntent_t *); 572extern int efs_readdir(am_node *, nfscookie, nfsdirlist *, nfsentry *, int); 573extern int eval_fs_opts(am_opts *, char *, char *, char *, char *, char *); 574extern int fwd_init(void); 575extern int fwd_packet(int, voidp, int, struct sockaddr_in *, struct sockaddr_in *, voidp, fwd_fun); 576extern int get_amd_program_number(void); 577extern int hasmntval(mntent_t *, char *); 578extern int is_network_member(const char *net); --- 59 unchanged lines hidden (view full) --- 638extern void mk_fattr(am_node *, nfsftype); 639extern void mnt_free(mntent_t *); 640extern void mp_to_fh(am_node *, am_nfs_fh *); 641extern void new_ttl(am_node *); 642extern void nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp); 643extern void normalize_slash(char *); 644extern void ops_showamfstypes(char *buf); 645extern void ops_showfstypes(char *outbuf); |
643extern void plog(int, char *,...); | 646extern void plog(int, char *,...) 647 __attribute__ ((__format__ (__printf__, 2, 3))); |
644extern void rem_que(qelem *); 645extern void reschedule_timeout_mp(void); 646extern void restart(void); 647extern void rmdirs(char *); 648extern void rpc_msg_init(struct rpc_msg *, u_long, u_long, u_long); 649extern void run_task(task_fun, voidp, cb_fun, voidp); 650extern void sched_task(cb_fun, voidp, voidp); 651extern void set_amd_program_number(int program); --- 304 unchanged lines hidden (view full) --- 956 */ 957# define XFREE(x) free(x) 958 959#endif /* not DEBUG */ 960 961extern int debug_flags; /* Debug options */ 962extern int debug_option (char *opt); 963extern struct opt_tab dbg_opt[]; | 648extern void rem_que(qelem *); 649extern void reschedule_timeout_mp(void); 650extern void restart(void); 651extern void rmdirs(char *); 652extern void rpc_msg_init(struct rpc_msg *, u_long, u_long, u_long); 653extern void run_task(task_fun, voidp, cb_fun, voidp); 654extern void sched_task(cb_fun, voidp, voidp); 655extern void set_amd_program_number(int program); --- 304 unchanged lines hidden (view full) --- 960 */ 961# define XFREE(x) free(x) 962 963#endif /* not DEBUG */ 964 965extern int debug_flags; /* Debug options */ 966extern int debug_option (char *opt); 967extern struct opt_tab dbg_opt[]; |
964extern void dplog(char *fmt, ...); | 968extern void dplog(char *fmt, ...) 969 __attribute__ ((__format__ (__printf__, 1, 2))); |
965 966/**************************************************************************/ 967/*** MISC (stuff left to autoconfiscate) ***/ 968/**************************************************************************/ 969 970#endif /* not _AM_UTILS_H */ | 970 971/**************************************************************************/ 972/*** MISC (stuff left to autoconfiscate) ***/ 973/**************************************************************************/ 974 975#endif /* not _AM_UTILS_H */ |