/*
* 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 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <errno.h>
#include <unistd.h>
#include <strings.h>
#include <sys/fs_reparse.h>
#include <syslog.h>
static int smb_reparse_init(const char *, nvlist_t **);
static void smb_reparse_free(nvlist_t *);
static int smb_reparse_set(const char *, nvlist_t *);
/*
* Checks the status of the object specified by 'path'
*
* Returns 0 and fills 'stat' with the proper status on
* success, otherwise returns an error code.
*/
int
{
int rptaglen;
return (0);
}
return (errno);
}
return (0);
}
return (errno);
else
return (0);
}
/*
* If the reparse point specified by the path already exists
* it is updated by given service type and its data. Update means
* that if such service type does not already exist, it is added
* otherwise it is overwritten by given data.
*
* If the reparse point does not exist, one is created with given
* service type and its data.
*/
int
{
int rc;
return (rc);
return (rc);
}
return (rc);
}
/*
* Removes the entry for the given service type from the
* specified reparse point. If there is no service entry
* left, the reparse point object will be deleted.
*/
int
{
int rc;
return (rc);
return (rc);
}
/* list is empty remove the object */
rc = 0;
} else {
}
return (rc);
}
/*
* Obtains data of the given service type from the specified
* reparse point. Function allocates the memory needed to hold
* the service data so the caller must free this memory by
* calling free().
*
* If 'svcdata' is NULL, successful return means that the reparse
* point contains a record for the given service type.
*/
int
{
int rc;
return (rc);
break;
}
rc = 0;
break;
}
}
return (rc);
}
/*
* Initializes the given nvpair list.
*
* This function assumes that the object specified by this path
* is a reparse point, so it does not do any verification.
*
* If specified reparse point does not exist the function
* returns successfully with an empty nvpair list.
*
* If the object exists and readlink is successful then nvpair
* list is polulated with the reparse service information, otherwise
* an error code is returned.
*/
static int
{
int rc;
return (ENOMEM);
return (0);
reparse_free(*nvl);
return (errno);
}
reparse_free(*nvl);
return (rc);
}
return (0);
}
/*
* Frees given nvlist
*/
static void
{
}
/*
* Create a reparse point with given services in the passed
* nvlist. If the reparse point already exists, it will be
* deleted and a new one with the given data is created.
*/
static int
{
char *rp_data;
int rc;
return (rc);
return (rc);
}
return (rc);
}