Lines Matching +full:proc +full:- +full:id

1 // SPDX-License-Identifier: GPL-2.0-only
3 * srm_env.c - Access to SRM environment
6 * (C) 2001,2002,2006 by Jan-Benedict Glaw <jbglaw@lug-owl.de>
8 * This driver is a modified version of Erik Mouw's example proc
25 #define BASE_DIR "srm_environment" /* Subdir in /proc/ */
31 MODULE_AUTHOR("Jan-Benedict Glaw <jbglaw@lug-owl.de>");
37 unsigned long id; member
66 unsigned long id = (unsigned long)m->private; in srm_env_proc_show() local
71 return -ENOMEM; in srm_env_proc_show()
73 ret = callback_getenv(id, page, PAGE_SIZE); in srm_env_proc_show()
79 ret = -EFAULT; in srm_env_proc_show()
93 unsigned long id = (unsigned long)pde_data(file_inode(file)); in srm_env_proc_write() local
98 return -ENOMEM; in srm_env_proc_write()
100 res = -EINVAL; in srm_env_proc_write()
104 res = -EFAULT; in srm_env_proc_write()
109 ret1 = callback_setenv(id, buf, count); in srm_env_proc_write()
142 "SRM->MILO->Linux, which gets " in srm_env_init()
144 return -ENODEV; in srm_env_init()
152 printk(KERN_ERR "Couldn't create base dir /proc/%s\n", in srm_env_init()
154 return -ENOMEM; in srm_env_init()
158 * Create per-name subdirectory in srm_env_init()
162 printk(KERN_ERR "Couldn't create dir /proc/%s/%s\n", in srm_env_init()
168 * Create per-number subdirectory in srm_env_init()
172 printk(KERN_ERR "Couldn't create dir /proc/%s/%s\n", in srm_env_init()
182 while (entry->name && entry->id) { in srm_env_init()
183 if (!proc_create_data(entry->name, 0644, named_dir, in srm_env_init()
184 &srm_env_proc_ops, (void *)entry->id)) in srm_env_init()
207 return -ENOMEM; in srm_env_init()