/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <ctype.h>
#include <syslog.h>
#include <string.h>
#include <errno.h>
#include <fslib.h>
#include <assert.h>
#include "automount.h"
void netbuf_free(struct netbuf *);
int
char *mntpnt,
char *rootp,
char *subdir,
char *key
)
{
int mntflags = 0;
if (trace > 1)
return (ENOENT);
}
/*
* get relative mountpoint
*/
if (trace > 2)
return (error);
}
if ((fnip = (autofs_args *)
goto free_mem;
}
goto free_mem;
goto free_mem;
goto free_mem;
/*
* get absolute mountpoint
*/
goto free_mem;
goto free_mem;
goto free_mem;
/*
* This timeout is really ignored by autofs, it uses the
* parent directory's timeout since it's really the one
*/
goto free_mem;
} else {
/* wierd case of a direct map pointer in another map */
goto free_mem;
}
} else {
}
/*
* Fill out action list.
*/
goto free_mem;
goto free_mem;
/*
* Get a buffer for the option string, it holds the map options plus
* space for "nest" if it isn't already in the option string
*/
goto free_mem;
if (!sawnest) {
goto free_mem;
if (len)
}
goto free_mem;
return (0);
/*
* We got an error, free the memory we allocated.
*/
}
/*
* Set *directp to 1 if "direct" is found, and 0 otherwise
* (mounts are indirect by default). If both "direct" and "indirect" are
* found, the last one wins.
*/
static int
{
*sawnestp = 0;
options[0] = '\0';
*directp = 0;
opt++;
}
*directp = 1;
*directp = 0;
*sawnestp = 1;
}
if (options[0] != '\0') {
}
}
};
return (0);
}
/*
* Free autofs_args structure
*/
void
{
if (p == NULL)
return;
if (p->path)
if (p->opts)
if (p->map)
if (p->subdir)
if (p->key)
free(p);
}
/*
* free mounta structure. Assumes that m->dataptr has
* been freed already
*/
void
{
if (m == NULL)
return;
if (m->spec)
if (m->dir)
if (m->fstype)
if (m->optptr)
/*
* no need to free 'm' since it is part of the
* action_list_entry structure.
*/
}