aoeblk.c (ad180f6f718527ab0d6d82b905486b219cdd2263) aoeblk.c (5657a819a8d94426c76be04dcedfad0f64cfff00)
1/* Copyright (c) 2013 Coraid, Inc. See COPYING for GPL terms. */
2/*
3 * aoeblk.c
4 * block device routines
5 */
6
7#include <linux/kernel.h>
8#include <linux/hdreg.h>

--- 145 unchanged lines hidden (view full) ---

154 return 0;
155}
156
157static int aoe_debugfs_open(struct inode *inode, struct file *file)
158{
159 return single_open(file, aoedisk_debugfs_show, inode->i_private);
160}
161
1/* Copyright (c) 2013 Coraid, Inc. See COPYING for GPL terms. */
2/*
3 * aoeblk.c
4 * block device routines
5 */
6
7#include <linux/kernel.h>
8#include <linux/hdreg.h>

--- 145 unchanged lines hidden (view full) ---

154 return 0;
155}
156
157static int aoe_debugfs_open(struct inode *inode, struct file *file)
158{
159 return single_open(file, aoedisk_debugfs_show, inode->i_private);
160}
161
162static DEVICE_ATTR(state, S_IRUGO, aoedisk_show_state, NULL);
163static DEVICE_ATTR(mac, S_IRUGO, aoedisk_show_mac, NULL);
164static DEVICE_ATTR(netif, S_IRUGO, aoedisk_show_netif, NULL);
162static DEVICE_ATTR(state, 0444, aoedisk_show_state, NULL);
163static DEVICE_ATTR(mac, 0444, aoedisk_show_mac, NULL);
164static DEVICE_ATTR(netif, 0444, aoedisk_show_netif, NULL);
165static struct device_attribute dev_attr_firmware_version = {
165static struct device_attribute dev_attr_firmware_version = {
166 .attr = { .name = "firmware-version", .mode = S_IRUGO },
166 .attr = { .name = "firmware-version", .mode = 0444 },
167 .show = aoedisk_show_fwver,
168};
167 .show = aoedisk_show_fwver,
168};
169static DEVICE_ATTR(payload, S_IRUGO, aoedisk_show_payload, NULL);
169static DEVICE_ATTR(payload, 0444, aoedisk_show_payload, NULL);
170
171static struct attribute *aoe_attrs[] = {
172 &dev_attr_state.attr,
173 &dev_attr_mac.attr,
174 &dev_attr_netif.attr,
175 &dev_attr_firmware_version.attr,
176 &dev_attr_payload.attr,
177 NULL,

--- 287 unchanged lines hidden ---
170
171static struct attribute *aoe_attrs[] = {
172 &dev_attr_state.attr,
173 &dev_attr_mac.attr,
174 &dev_attr_netif.attr,
175 &dev_attr_firmware_version.attr,
176 &dev_attr_payload.attr,
177 NULL,

--- 287 unchanged lines hidden ---