当前位置: 首页>>代码示例>>C++>>正文


C++ register_filesystem函数代码示例

本文整理汇总了C++中register_filesystem函数的典型用法代码示例。如果您正苦于以下问题:C++ register_filesystem函数的具体用法?C++ register_filesystem怎么用?C++ register_filesystem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了register_filesystem函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: init_ncp_fs

static int __init init_ncp_fs(void)
{
	int err;
	DPRINTK("ncpfs: init_ncp_fs called\n");

	err = init_inodecache();
	if (err)
		goto out1;
	err = register_filesystem(&ncp_fs_type);
	if (err)
		goto out;
	return 0;
out:
	destroy_inodecache();
out1:
	return err;
}
开发者ID:AllenDou,项目名称:linux,代码行数:17,代码来源:inode.c

示例2: init_qnx4_fs

static int __init init_qnx4_fs(void)
{
	int err;

	err = init_inodecache();
	if (err)
		return err;

	err = register_filesystem(&qnx4_fs_type);
	if (err) {
		destroy_inodecache();
		return err;
	}

	printk(KERN_INFO "QNX4 filesystem 0.2.3 registered.\n");
	return 0;
}
开发者ID:Emineminero,项目名称:DORIMANX_LG_STOCK_LP_KERNEL,代码行数:17,代码来源:inode.c

示例3: init_squashfs_fs

static int __init init_squashfs_fs(void)
{
	int err = init_inodecache();

	if (err)
		return err;

	err = register_filesystem(&squashfs_fs_type);
	if (err) {
		destroy_inodecache();
		return err;
	}

	pr_info("version 4.0 (2009/01/31) Phillip Lougher\n");

	return 0;
}
开发者ID:020gzh,项目名称:linux,代码行数:17,代码来源:super.c

示例4: init_f2fs_fs

static int __init init_f2fs_fs(void)
{
	int err;

	err = init_inodecache();
	if (err)
		goto fail;
	err = create_node_manager_caches();
	if (err)
		goto free_inodecache;
	err = create_segment_manager_caches();
	if (err)
		goto free_node_manager_caches;
	err = create_gc_caches();
	if (err)
		goto free_segment_manager_caches;
	err = create_checkpoint_caches();
	if (err)
		goto free_gc_caches;
	f2fs_kset = kset_create_and_add("f2fs", NULL, fs_kobj);
	if (!f2fs_kset) {
		err = -ENOMEM;
		goto free_checkpoint_caches;
	}
	err = register_filesystem(&f2fs_fs_type);
	if (err)
		goto free_kset;
	f2fs_create_root_stats();
	f2fs_proc_root = proc_mkdir("fs/f2fs", NULL);
	return 0;

free_kset:
	kset_unregister(f2fs_kset);
free_checkpoint_caches:
	destroy_checkpoint_caches();
free_gc_caches:
	destroy_gc_caches();
free_segment_manager_caches:
	destroy_segment_manager_caches();
free_node_manager_caches:
	destroy_node_manager_caches();
free_inodecache:
	destroy_inodecache();
fail:
	return err;
}
开发者ID:AndroPlus-org,项目名称:android_kernel_sony_msm8974ac,代码行数:46,代码来源:super.c

示例5: init_vxext_fs

static int __init init_vxext_fs(void)
{
   int err;

   err = fat_cache_init();
   if (err)
      return err;

   err = fat_init_inodecache();
   if (err)
      goto failed;

   return register_filesystem(&vxext_fs_type);

failed:
   fat_cache_destroy();
   return err;
}
开发者ID:jens-maus,项目名称:vxext_fs,代码行数:18,代码来源:vxext.c

示例6: init_exofs

static int __init init_exofs(void)
{
	int err;

	err = init_inodecache();
	if (err)
		goto out;

	err = register_filesystem(&exofs_type);
	if (err)
		goto out_d;

	return 0;
out_d:
	destroy_inodecache();
out:
	return err;
}
开发者ID:AdrianHuang,项目名称:uclinux-robutest,代码行数:18,代码来源:super.c

示例7: init_wrapfs_fs

static int __init init_wrapfs_fs(void)
{
	int err;
	pr_info("Registering u2fs " WRAPFS_VERSION "\n");
	err = wrapfs_init_inode_cache();
	if (err)
		goto out;
	err = wrapfs_init_dentry_cache();
	if (err)
		goto out;
	err = register_filesystem(&wrapfs_fs_type);
out:
	if (err) {
		wrapfs_destroy_inode_cache();
		wrapfs_destroy_dentry_cache();
	}
	return err;
}
开发者ID:raghavendrasuvvari,项目名称:U2fs-FileSystem,代码行数:18,代码来源:main.c

示例8: btrfs_init_test_fs

int btrfs_init_test_fs(void)
{
	int ret;

	ret = register_filesystem(&test_type);
	if (ret) {
		printk(KERN_ERR "btrfs: cannot register test file system\n");
		return ret;
	}

	test_mnt = kern_mount(&test_type);
	if (IS_ERR(test_mnt)) {
		printk(KERN_ERR "btrfs: cannot mount test file system\n");
		unregister_filesystem(&test_type);
		return ret;
	}
	return 0;
}
开发者ID:7799,项目名称:linux,代码行数:18,代码来源:btrfs-tests.c

示例9: plgfs_init

static int __init plgfs_init(void)
{
	int rv;

	plgfs_major = register_blkdev(0, "pluginfs");
	if (plgfs_major < 0)
	       return plgfs_major;	

	rv = register_filesystem(&plgfs_type);
	if (rv) {
		unregister_blkdev(plgfs_major, "pluginfs");
		return rv;
	}

	pr_info("Plugin File System Version " PLGFS_VERSION); 

	return 0;
}
开发者ID:kcomkar,项目名称:pluginfs,代码行数:18,代码来源:plgfs.c

示例10: init_ext2_fs

static int __init init_ext2_fs(void)
{
	int err = init_ext2_xattr();
	if (err)
		return err;
	err = init_inodecache();
	if (err)
		goto out1;
        err = register_filesystem(&ext2_fs_type);
	if (err)
		goto out;
	return 0;
out:
	destroy_inodecache();
out1:
	exit_ext2_xattr();
	return err;
}
开发者ID:sushengloong,项目名称:comp3301-s4239799,代码行数:18,代码来源:super.c

示例11: init_ramfs_fs

int __init init_ramfs_fs(void)
{
	static unsigned long once;
	int err;

	if (test_and_set_bit(0, &once))
		return 0;

	err = bdi_init(&ramfs_backing_dev_info);
	if (err)
		return err;

	err = register_filesystem(&ramfs_fs_type);
	if (err)
		bdi_destroy(&ramfs_backing_dev_info);

	return err;
}
开发者ID:arm10c,项目名称:linux-stable,代码行数:18,代码来源:inode.c

示例12: ovl_init

static int __init ovl_init(void)
{
	int err;

	ovl_inode_cachep = kmem_cache_create("ovl_inode",
					     sizeof(struct ovl_inode), 0,
					     (SLAB_RECLAIM_ACCOUNT|
					      SLAB_MEM_SPREAD|SLAB_ACCOUNT),
					     ovl_inode_init_once);
	if (ovl_inode_cachep == NULL)
		return -ENOMEM;

	err = register_filesystem(&ovl_fs_type);
	if (err)
		kmem_cache_destroy(ovl_inode_cachep);

	return err;
}
开发者ID:avagin,项目名称:linux,代码行数:18,代码来源:super.c

示例13: VMBlockInitFileSystem

int
VMBlockInitFileSystem(char const *root)  // IN: directory redirecting to
{
   int ret;

   if (!root) {
      Warning("VMBlockInitFileSystem: root not provided "
              "(missing module parameter?)\n");
      return -EINVAL;
   }

   /*
    * Here we assume that the provided root is valid so the module will load.
    * The mount operation will fail if that is not the case.
    */
   fsRoot = root;
   fsRootLen = strlen(fsRoot);

   if (fsRootLen >= PATH_MAX) {
      return -ENAMETOOLONG;
   }

   /* Initialize our inode slab allocator */
   VMBlockInodeCache = os_kmem_cache_create("VMBlockInodeCache",
                                            sizeof (VMBlockInodeInfo),
                                            0,
                                            InodeCacheCtor);
   if (!VMBlockInodeCache) {
      Warning("VMBlockInitFileSystem: could not initialize inode cache\n");
      return -ENOMEM;
   }

   /* Tell the kernel about our file system */
   ret = register_filesystem(&fsType);
   if (ret < 0) {
      Warning("VMBlockInitFileSystem: could not initialize file system\n");
      kmem_cache_destroy(VMBlockInodeCache);
      return ret;
   }

   LOG(4, "file system registered with root of [%s]\n", fsRoot);

   return 0;
}
开发者ID:protomouse,项目名称:open-vm-tools,代码行数:44,代码来源:filesystem.c

示例14: proc_root_init

void __init proc_root_init(void)
{
	int err;

	proc_init_inodecache();
	err = register_filesystem(&proc_fs_type);
	if (err)
		return;
	proc_mnt = kern_mount_data(&proc_fs_type, &init_pid_ns);
	err = PTR_ERR(proc_mnt);
	if (IS_ERR(proc_mnt)) {
		unregister_filesystem(&proc_fs_type);
		return;
	}

	proc_symlink("mounts", NULL, "self/mounts");

	proc_net_init();

#ifdef CONFIG_SYSVIPC
	proc_mkdir("sysvipc", NULL);
#endif
	proc_mkdir("fs", NULL);
	proc_mkdir("driver", NULL);
	proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */
#if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE)
	/* just give it a mountpoint */
	proc_mkdir("openprom", NULL);
#endif
	proc_tty_init();
#ifdef CONFIG_PROC_DEVICETREE
	proc_device_tree_init();
#endif
	proc_mkdir("bus", NULL);

#if defined(CONFIG_MIPS_BRCM)
	proc_brcm = proc_mkdir("brcm", NULL);
	proc_brcm_init(proc_brcm);
#endif

	proc_sys_init();


}
开发者ID:fr34k8,项目名称:DT_Hybrid_GPL_1.00.053,代码行数:44,代码来源:root.c

示例15: proc_root_init

void __init proc_root_init(void)
{
	int err = proc_init_inodecache();
	if (err)
		return;
	err = register_filesystem(&proc_fs_type);
	if (err)
		return;
	proc_mnt = kern_mount_data(&proc_fs_type, &init_pid_ns);
	err = PTR_ERR(proc_mnt);
	if (IS_ERR(proc_mnt)) {
		unregister_filesystem(&proc_fs_type);
		return;
	}

	proc_misc_init();

	proc_net_init();

#ifdef CONFIG_SYSVIPC
	proc_mkdir("sysvipc", NULL);
#endif
	proc_mkdir("fs", NULL);
	proc_mkdir("driver", NULL);
	proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */
#if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE)
	/* just give it a mountpoint */
	proc_mkdir("openprom", NULL);
#endif
	proc_tty_init();
#ifdef CONFIG_PROC_DEVICETREE
	proc_device_tree_init();
#endif
#ifdef CONFIG_GRKERNSEC_PROC_ADD
#ifdef CONFIG_GRKERNSEC_PROC_USER
	proc_mkdir_mode("bus", S_IRUSR | S_IXUSR, NULL);
#elif defined(CONFIG_GRKERNSEC_PROC_USERGROUP)
	proc_mkdir_mode("bus", S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP, NULL);
#endif
#else
	proc_mkdir("bus", NULL);
#endif
	proc_sys_init();
}
开发者ID:mikeberkelaar,项目名称:grhardened,代码行数:44,代码来源:root.c


注:本文中的register_filesystem函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。