示例#1
0
int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root,
	char const * name, const struct file_operations * fops, int perm)
{
	if (!__oprofilefs_create_file(sb, root, name, fops, perm))
		return -EFAULT;
	return 0;
}
示例#2
0
int oprofilefs_create_ro_atomic(struct super_block * sb, struct dentry * root,
	char const * name, atomic_t * val)
{
	struct dentry * d = __oprofilefs_create_file(sb, root, name, &atomic_ro_fops);
	if (!d)
		return -EFAULT;

	d->d_inode->u.generic_ip = val;
	return 0;
}
示例#3
0
int oprofilefs_create_ro_ulong(struct super_block * sb, struct dentry * root,
	char const * name, unsigned long * val)
{
	struct dentry * d = __oprofilefs_create_file(sb, root, name, &ulong_ro_fops);
	if (!d)
		return -EFAULT;

	d->d_inode->u.generic_ip = val;
	return 0;
}
示例#4
0
int oprofilefs_create_ulong(struct super_block *sb, struct dentry *root,
	char const *name, unsigned long *val)
{
	struct dentry *d = __oprofilefs_create_file(sb, root, name,
						     &ulong_fops, 0644);
	if (!d)
		return -EFAULT;

	d->d_inode->i_private = val;
	return 0;
}
示例#5
0
int oprofilefs_create_ro_atomic(struct super_block *sb, struct dentry *root,
	char const *name, atomic_unchecked_t *val)
{
	struct dentry *d = __oprofilefs_create_file(sb, root, name,
						     &atomic_ro_fops, 0444);
	if (!d)
		return -EFAULT;

	d->d_inode->i_private = val;
	return 0;
}
示例#6
0
int oprofilefs_create_file_perm(struct dentry *root,
	char const *name, const struct file_operations *fops, int perm)
{
	return __oprofilefs_create_file(root, name, fops, perm, NULL);
}
示例#7
0
int oprofilefs_create_ro_atomic(struct dentry *root,
	char const *name, atomic_t *val)
{
	return __oprofilefs_create_file(root, name,
					&atomic_ro_fops, 0444, val);
}
示例#8
0
int oprofilefs_create_ro_ulong(struct dentry *root,
	char const *name, unsigned long *val)
{
	return __oprofilefs_create_file(root, name,
					&ulong_ro_fops, 0444, val);
}
示例#9
0
int oprofilefs_create_file(struct super_block *sb, struct dentry *root,
	char const *name, const struct file_operations *fops)
{
	return __oprofilefs_create_file(sb, root, name, fops, 0644, NULL);
}
示例#10
0
int oprofilefs_create_ulong(struct super_block *sb, struct dentry *root,
	char const *name, unsigned long *val)
{
	return __oprofilefs_create_file(sb, root, name,
					&ulong_fops, 0644, val);
}