1 --- lin_tape-3.0.20/fo_util.c~ 2017-05-27 21:22:52.000000000 +0200
2 +++ lin_tape-3.0.20/fo_util.c 2017-11-17 09:04:43.375810976 +0100
5 /** Enable the change of the debug control flag.
6 * /sys/bus/scsi/drivers/pfo/debug_flag */
7 -static ssize_t pfoattr_debug_flag_set(struct device_driver *dev,
8 +static ssize_t debug_flag_store(struct device_driver *dev,
9 const char *buf, size_t count)
11 sscanf(buf, "0x%x", &pfo_debug_flag);
14 /** Enable the cat of the debug control flag.
15 * /sys/bus/scsi/drivers/pfo/debug_flag */
16 -static ssize_t pfoattr_debug_flag_get(struct device_driver *ddp, char *buf)
17 +static ssize_t debug_flag_show(struct device_driver *ddp, char *buf)
20 return scnprintf(buf, PAGE_SIZE,
21 "debug flag=%04x\necho 0x<hexvalue> > debug_flag to change\n",
24 -static DRIVER_ATTR(debug_flag, S_IRUGO|S_IWUSR|S_IWGRP,
25 - pfoattr_debug_flag_get, pfoattr_debug_flag_set);
26 +static DRIVER_ATTR_RW(debug_flag);
28 /** Enable the cat of the debug buffer.
29 * /sys/bus/scsi/drivers/pfo/debug_buffer */
30 -static ssize_t pfoattr_debug_buffer_get(struct device_driver *ddp, char *buf)
31 +static ssize_t debug_buffer_show(struct device_driver *ddp, char *buf)
34 if (debug_buffer[0] == '\001') {
39 -static DRIVER_ATTR(debug_buffer, S_IRUGO, pfoattr_debug_buffer_get, NULL);
40 +static DRIVER_ATTR_RO(debug_buffer);
42 /** Enable the cat of the trace buffer.
43 * /sys/bus/scsi/drivers/pfo/trace */
44 -static ssize_t pfoattr_debug_trace_get(struct device_driver *ddp, char *buf)
45 +static ssize_t debug_trace_show(struct device_driver *ddp, char *buf)
53 -static DRIVER_ATTR(trace, S_IRUGO, pfoattr_debug_trace_get, NULL);
54 +static DRIVER_ATTR_RO(trace);
56 int init_debug(struct device_driver *pfo_gendrv)