inode.c (292dd876ee765c478b27c93cc51e93a558ed58bf) | inode.c (99ac48f54a91d02140c497edc31dc57d4bc5c85d) |
---|---|
1/* 2 * file.c - part of debugfs, a tiny little debug file system 3 * 4 * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com> 5 * Copyright (C) 2004 IBM Inc. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License version --- 177 unchanged lines hidden (view full) --- 186 * 187 * If debugfs is not enabled in the kernel, the value -ENODEV will be 188 * returned. It is not wise to check for this value, but rather, check for 189 * NULL or !NULL instead as to eliminate the need for #ifdef in the calling 190 * code. 191 */ 192struct dentry *debugfs_create_file(const char *name, mode_t mode, 193 struct dentry *parent, void *data, | 1/* 2 * file.c - part of debugfs, a tiny little debug file system 3 * 4 * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com> 5 * Copyright (C) 2004 IBM Inc. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License version --- 177 unchanged lines hidden (view full) --- 186 * 187 * If debugfs is not enabled in the kernel, the value -ENODEV will be 188 * returned. It is not wise to check for this value, but rather, check for 189 * NULL or !NULL instead as to eliminate the need for #ifdef in the calling 190 * code. 191 */ 192struct dentry *debugfs_create_file(const char *name, mode_t mode, 193 struct dentry *parent, void *data, |
194 struct file_operations *fops) | 194 const struct file_operations *fops) |
195{ 196 struct dentry *dentry = NULL; 197 int error; 198 199 pr_debug("debugfs: creating file '%s'\n",name); 200 201 error = simple_pin_fs("debugfs", &debugfs_mount, &debugfs_mount_count); 202 if (error) --- 116 unchanged lines hidden --- | 195{ 196 struct dentry *dentry = NULL; 197 int error; 198 199 pr_debug("debugfs: creating file '%s'\n",name); 200 201 error = simple_pin_fs("debugfs", &debugfs_mount, &debugfs_mount_count); 202 if (error) --- 116 unchanged lines hidden --- |