Example #1
0
File: proc.c Project: ArcEye/RTAI
int __init rtdm_proc_init(void)
{
	int ret;

	/* Initialise vfiles */
//	ret = xnvfile_init_root(); /proc/rtai is initted elsewhere
	ret = xnvfile_init_dir("rtai/rtdm", &rtdm_vfroot, &nkvfroot);
	if (ret)
		goto error;

	ret = xnvfile_init_regular("named_devices", &named_vfile, &rtdm_vfroot);
	if (ret)
		goto error;

	ret = xnvfile_init_regular("protocol_devices", &proto_vfile, &rtdm_vfroot);
	if (ret)
		goto error;

	ret = xnvfile_init_regular("open_fildes", &openfd_vfile, &rtdm_vfroot);
	if (ret)
		goto error;

	ret = xnvfile_init_regular("fildes", &allfd_vfile, &rtdm_vfroot);
	if (ret)
		goto error;

	return 0;

error:
	rtdm_proc_cleanup();
	return ret;
}
Example #2
0
int __init xnprocfs_init_tree(void)
{
	int ret;

	ret = xnvfile_init_root();
	if (ret)
		return ret;

	ret = xnsched_init_proc();
	if (ret)
		return ret;

	xnclock_init_proc();
	xnheap_init_proc();
	xnintr_init_proc();
	xnvfile_init_regular("latency", &latency_vfile, &cobalt_vfroot);
	xnvfile_init_regular("version", &version_vfile, &cobalt_vfroot);
	xnvfile_init_regular("faults", &faults_vfile, &cobalt_vfroot);
	xnvfile_init_regular("apc", &apc_vfile, &cobalt_vfroot);
#ifdef CONFIG_XENO_OPT_DEBUG
	xnvfile_init_dir("debug", &cobalt_debug_vfroot, &cobalt_vfroot);
#if XENO_DEBUG(LOCKING)
	xnvfile_init_regular("lock", &lock_vfile, &cobalt_debug_vfroot);
#endif
#endif /* XENO_DEBUG(COBALT) */

	return 0;
}
Example #3
0
void xnintr_init_proc(void)
{
	xnvfile_init_regular("irq", &irq_vfile, &nkvfroot);
#ifdef CONFIG_SMP
	xnvfile_init_regular("affinity", &affinity_vfile, &nkvfroot);
#endif /* CONFIG_SMP */
}
Example #4
0
File: proc.c Project: ArcEye/RTAI
int rtdm_proc_register_device(struct rtdm_device *device)
{
	int ret;

	ret = xnvfile_init_dir(device->proc_name,
			       &device->vfroot, &rtdm_vfroot);
	if (ret)
		goto err_out;

	memset(&device->info_vfile, 0, sizeof(device->info_vfile));
	device->info_vfile.ops = &devinfo_vfile_ops;

	ret = xnvfile_init_regular("information", &device->info_vfile,
				   &device->vfroot);
	if (ret) {
		xnvfile_destroy_dir(&device->vfroot);
		goto err_out;
	}

	xnvfile_priv(&device->info_vfile) = device;

	return 0;

      err_out:
	xnlogerr("RTDM: error while creating device vfile\n");
	return ret;
}
Example #5
0
static int rtnet_proc_register(void)
{
    int err;

    err = xnvfile_init_dir("rtnet", &rtnet_proc_root, NULL);
    if (err < 0)
        goto error1;

    err = xnvfile_init_regular("devices", &rtnet_devices_vfile, &rtnet_proc_root);
    if (err < 0)
        goto error2;

    err = xnvfile_init_regular("rtskb", &rtnet_rtskb_vfile, &rtnet_proc_root);
    if (err < 0)
        goto error3;

    err = xnvfile_init_regular("version", &rtnet_version_vfile, &rtnet_proc_root);
    if (err < 0)
        goto error4;

    err = xnvfile_init_regular("stats", &rtnet_stats_vfile, &rtnet_proc_root);
    if (err < 0)
        goto error5;

    return 0;

error5:
    xnvfile_destroy_regular(&rtnet_version_vfile);

error4:
    xnvfile_destroy_regular(&rtnet_rtskb_vfile);

error3:
    xnvfile_destroy_regular(&rtnet_devices_vfile);

error2:
    xnvfile_destroy_dir(&rtnet_proc_root);

error1:
    printk("RTnet: unable to initialize /proc entries\n");
    return err;
}
Example #6
0
void xntimer_init_proc(void)
{
	xnvfile_init_regular("timer", &timer_vfile, &nkvfroot);
}