aboutsummaryrefslogtreecommitdiffstats
path: root/include/math-emu
ModeNameSize
-rw-r--r--double.h6303logstatsplainblame
-rw-r--r--op-1.h9449logstatsplainblame
-rw-r--r--op-2.h19998logstatsplainblame
-rw-r--r--op-4.h23795logstatsplainblame
-rw-r--r--op-8.h3902logstatsplainblame
-rw-r--r--op-common.h26644logstatsplainblame
-rw-r--r--quad.h6633logstatsplainblame
-rw-r--r--single.h3930logstatsplainblame
-rw-r--r--soft-fp.h5177logstatsplainblame
pre>






                                                
                        



























































































                                                                                   
                                      
                               














                                                                                
/*
 *	fs/nfsctl.c
 *
 *	This should eventually move to userland.
 *
 */
#include <linux/config.h>
#include <linux/types.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/sunrpc/svc.h>
#include <linux/nfsd/nfsd.h>
#include <linux/nfsd/syscall.h>
#include <linux/linkage.h>
#include <linux/namei.h>
#include <linux/mount.h>
#include <linux/syscalls.h>
#include <asm/uaccess.h>

/*
 * open a file on nfsd fs
 */

static struct file *do_open(char *name, int flags)
{
	struct nameidata nd;
	int error;

	nd.mnt = do_kern_mount("nfsd", 0, "nfsd", NULL);

	if (IS_ERR(nd.mnt))
		return (struct file *)nd.mnt;

	nd.dentry = dget(nd.mnt->mnt_root);
	nd.last_type = LAST_ROOT;
	nd.flags = 0;
	nd.depth = 0;

	error = path_walk(name, &nd);
	if (error)
		return ERR_PTR(error);

	if (flags == O_RDWR)
		error = may_open(&nd,MAY_READ|MAY_WRITE,FMODE_READ|FMODE_WRITE);
	else
		error = may_open(&nd, MAY_WRITE, FMODE_WRITE);

	if (!error)
		return dentry_open(nd.dentry, nd.mnt, flags);

	path_release(&nd);
	return ERR_PTR(error);
}

static struct {
	char *name; int wsize; int rsize;
} map[] = {
	[NFSCTL_SVC] = {
		.name	= ".svc",
		.wsize	= sizeof(struct nfsctl_svc)
	},
	[NFSCTL_ADDCLIENT] = {