Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Z
ZIO
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
ZIO
Commits
3c587519
Commit
3c587519
authored
May 30, 2016
by
Federico Vaga
Committed by
Federico Vaga
Aug 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sysfs: show interleaving status
Signed-off-by:
Federico Vaga
<
federico.vaga@gmail.com
>
parent
92daf48a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
sysfs.c
sysfs.c
+12
-0
No files found.
sysfs.c
View file @
3c587519
...
...
@@ -859,6 +859,14 @@ static ssize_t zio_show_pref(struct device *dev,
}
static
ssize_t
zio_show_inte
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
)
{
struct
zio_channel
*
chan
=
to_zio_chan
(
dev
);
return
sprintf
(
buf
,
"%d
\n
"
,
!!
(
chan
->
flags
&
ZIO_CSET_CHAN_INTERLEAVE
));
}
#if ZIO_HAS_BINARY_CONTROL
/*
* zobj_read_cur_ctrl
...
...
@@ -938,6 +946,7 @@ enum zio_default_attribute_numeration {
ZIO_DAN_ALAR
,
/* alarms */
ZIO_DAN_DIRE
,
/* direction */
ZIO_DAN_PREF
,
/* prefer-new */
ZIO_DAN_INTE
,
/* interleave */
};
/* default zio attributes */
...
...
@@ -962,6 +971,8 @@ static struct device_attribute zio_default_attributes[] = {
zio_show_dire
,
NULL
),
[
ZIO_DAN_PREF
]
=
__ATTR
(
prefer
-
new
,
ZIO_RW_PERM
,
zio_show_pref
,
zio_store_pref
),
[
ZIO_DAN_INTE
]
=
__ATTR
(
interleave
,
ZIO_RW_PERM
,
zio_show_inte
,
NULL
),
__ATTR_NULL
,
};
/* default attributes for most of the zio objects */
...
...
@@ -986,6 +997,7 @@ static struct attribute *def_cset_attrs_ptr[] = {
/* default attributes for channel */
static
struct
attribute
*
def_chan_attrs_ptr
[]
=
{
&
zio_default_attributes
[
ZIO_DAN_ALAR
].
attr
,
&
zio_default_attributes
[
ZIO_DAN_INTE
].
attr
,
NULL
,
};
/* default attributes for buffer instance */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment