static int bind_works = 1;
-static void hash_init(void)
+static void
+hash_init(void)
{
int i;
struct rlimit rlim;
}
-static void hash_insert(int fd, am_node *mp)
+static void
+hash_insert(int fd, am_node *mp)
{
if (hash[fd] != 0)
plog(XLOG_ERROR, "file descriptor %d already in the hash", fd);
}
-static void hash_delete(int fd)
+static void
+hash_delete(int fd)
{
int i;
out:
if (target2)
- free(target2);
+ XFREE(target2);
if (err)
return errno;
/*
* AUTOFS XDR FUNCTIONS:
*/
+
#ifndef HAVE_XDR_MNTREQUEST
bool_t
xdr_mntrequest(XDR *xdrs, mntrequest *objp)
{
autofs_fh_t *fh = mp->am_autofs_fh;
#ifdef HAVE_AUTOFS_ARGS_T_ADDR
- free(fh->addr.buf);
+ XFREE(fh->addr.buf);
#endif /* HAVE_AUTOFS_ARGS_T_ADDR */
XFREE(fh);
mp->am_autofs_fh = NULL;
}
out:
- free(space_hack);
+ XFREE(space_hack);
if (target2)
- free(target2);
+ XFREE(target2);
if (err)
return errno;
}
out:
- free(space_hack);
+ XFREE(space_hack);
return err;
}
return 0;
}
+
int
autofs_umount_failed(am_node *mp)
{
mp->am_dev = stb.st_dev;
mp->am_rdev = stb.st_rdev;
}
- free(space_hack);
+ XFREE(space_hack);
/* don't expire the entries -- the kernel will do it for us */
mp->am_flags |= AMF_NOTIMEOUT;
/* We don't want any timeouts on autofs nodes */
mp->am_autofs_ttl = NEVER;
}
-
#endif /* HAVE_FS_AUTOFS */
/*
* AUTOFS XDR FUNCTIONS:
*/
+
bool_t
xdr_autofs_stat(XDR *xdrs, autofs_stat *objp)
{
return (TRUE);
}
+
bool_t
xdr_autofs_action(XDR *xdrs, autofs_action *objp)
{
return (TRUE);
}
+
bool_t
xdr_linka(XDR *xdrs, linka *objp)
{
return (TRUE);
}
+
bool_t
xdr_autofs_netbuf(XDR *xdrs, struct netbuf *objp)
{
return (dummy);
}
+
bool_t
xdr_autofs_args(XDR *xdrs, autofs_args *objp)
{
return (TRUE);
}
+
bool_t
xdr_mounta(XDR *xdrs, struct mounta *objp)
{
return (TRUE);
}
+
bool_t
xdr_action_list_entry(XDR *xdrs, action_list_entry *objp)
{
return (TRUE);
}
+
bool_t
xdr_action_list(XDR *xdrs, action_list *objp)
{
return (TRUE);
}
+
bool_t
xdr_umntrequest(XDR *xdrs, umntrequest *objp)
{
return (TRUE);
}
+
/*
* These exist only in the AutoFS V2 protocol.
*/
return (TRUE);
}
+
bool_t
xdr_postumntres(XDR *xdrs, postumntres *objp)
{
return (TRUE);
}
+
bool_t
xdr_postmountreq(XDR *xdrs, postmountreq *objp)
{
return (TRUE);
}
+
bool_t
xdr_postmountres(XDR *xdrs, postmountres *objp)
{
}
#endif /* AUTOFS_POSTUNMOUNT */
+
bool_t
xdr_autofs_res(XDR *xdrs, autofs_res *objp)
{
return (TRUE);
}
+
bool_t
xdr_autofs_lookupargs(XDR *xdrs, autofs_lookupargs *objp)
{
return (TRUE);
}
+
bool_t
xdr_autofs_mountres(XDR *xdrs, autofs_mountres *objp)
{
return (TRUE);
}
+
bool_t
xdr_lookup_result_type(XDR *xdrs, lookup_result_type *objp)
{
return (TRUE);
}
+
bool_t
xdr_autofs_lookupres(XDR *xdrs, autofs_lookupres *objp)
{
return (TRUE);
}
+
bool_t
xdr_autofs_rddirargs(XDR *xdrs, autofs_rddirargs *objp)
{
{
autofs_fh_t *fh = mp->am_autofs_fh;
#ifdef HAVE_AUTOFS_ARGS_T_ADDR
- free(fh->addr.buf);
+ XFREE(fh->addr.buf);
#endif /* HAVE_AUTOFS_ARGS_T_ADDR */
XFREE(fh);
mp->am_autofs_fh = NULL;
out:
if (target2)
- free(target2);
+ XFREE(target2);
if (err)
return errno;
return 0;
}
+
int
autofs_umount_failed(am_node *mp)
{