• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ register_filesystem函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: usbdevfs_init

int __init usbdevfs_init(void)
{
	int ret;

	for (ret = 0; ret < NRSPECIAL; ret++) {
		INIT_LIST_HEAD(&special[ret].inodes);
	}
	if ((ret = usb_register(&usbdevfs_driver)))
		return ret;
	if ((ret = register_filesystem(&usbdevice_fs_type))) {
		usb_deregister(&usbdevfs_driver);
		return ret;
	}
#ifdef CONFIG_PROC_FS		
	/* create mount point for usbdevfs */
	usbdir = proc_mkdir("usb", proc_bus);
#endif	
	return ret;
}
开发者ID:hugh712,项目名称:Jollen,代码行数:19,代码来源:inode.c


示例17: gfs_init

static int __init gfs_init(void)
{
	//check_sizes();
	//gfs_inode_cache = kmem_cache_create("gfsinode_cache", sizeof(struct gfs_inode_info),
	//		0, (SLAB_RECLAIM_ACCOUNT|SLAB_POISON|SLAB_RED_ZONE|SLAB_PANIC),
	//		init_once);
	int r = register_filesystem(&gfs_type);
	if(r)
		goto ret;
	r = gfs_sysfs_init();
	if(r)	
		goto unreg;
	return 0;
unreg:		
	unregister_filesystem(&gfs_type);	
ret:
	PVAR(r, "%d");
	return r;
}
开发者ID:Arseny-N,项目名称:fgfs,代码行数:19,代码来源:inode.c


示例18: anon_inode_init

static int __init anon_inode_init(void)
{
	int error;

	error = register_filesystem(&anon_inode_fs_type);
	if (error)
		goto err_exit;
	anon_inode_mnt = kern_mount(&anon_inode_fs_type);
	if (IS_ERR(anon_inode_mnt)) {
		error = PTR_ERR(anon_inode_mnt);
		goto err_unregister_filesystem;
	}
	return 0;

err_unregister_filesystem:
	unregister_filesystem(&anon_inode_fs_type);
err_exit:
	panic(KERN_ERR "anon_inode_init() failed (%d)\n", error);
}
开发者ID:Albinoman887,项目名称:pyramid-3.4.10,代码行数:19,代码来源:anon_inodes.c


示例19: init_xfs_fs

STATIC int __init
init_xfs_fs( void )
{
	int			error;
	struct sysinfo		si;
	static char		message[] __initdata =
		KERN_INFO "SGI XFS " XFS_VERSION_STRING " with "
		XFS_BUILD_OPTIONS " enabled\n";

	printk(message);

	si_meminfo(&si);
	xfs_physmem = si.totalram;

	error = init_inodecache();
	if (error < 0)
		goto undo_inodecache;

	error = pagebuf_init();
	if (error < 0)
		goto undo_pagebuf;

	vn_init();
	xfs_init();
	uuid_init();
	vfs_initdmapi();
	vfs_initquota();

	error = register_filesystem(&xfs_fs_type);
	if (error)
		goto undo_register;
	return 0;

undo_register:
	pagebuf_terminate();

undo_pagebuf:
	destroy_inodecache();

undo_inodecache:
	return error;
}
开发者ID:xricson,项目名称:knoppix,代码行数:42,代码来源:xfs_super.c


示例20: hypfs_init

static int __init hypfs_init(void)
{
	int rc;

	rc = hypfs_dbfs_init();
	if (rc)
		return rc;
	if (hypfs_diag_init()) {
		rc = -ENODATA;
		goto fail_dbfs_exit;
	}
	if (hypfs_vm_init()) {
		rc = -ENODATA;
		goto fail_hypfs_diag_exit;
	}
	if (hypfs_sprp_init()) {
		rc = -ENODATA;
		goto fail_hypfs_vm_exit;
	}
	s390_kobj = kobject_create_and_add("s390", hypervisor_kobj);
	if (!s390_kobj) {
		rc = -ENOMEM;
		goto fail_hypfs_sprp_exit;
	}
	rc = register_filesystem(&hypfs_type);
	if (rc)
		goto fail_filesystem;
	return 0;

fail_filesystem:
	kobject_put(s390_kobj);
fail_hypfs_sprp_exit:
	hypfs_sprp_exit();
fail_hypfs_vm_exit:
	hypfs_vm_exit();
fail_hypfs_diag_exit:
	hypfs_diag_exit();
fail_dbfs_exit:
	hypfs_dbfs_exit();
	pr_err("Initialization of hypfs failed with rc=%i\n", rc);
	return rc;
}
开发者ID:1800alex,项目名称:linux,代码行数:42,代码来源:inode.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ register_framebuffer函数代码示例发布时间:2022-05-30
下一篇:
C++ register_error函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap