Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zio
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
misc
zio
Commits
3c587519
Commit
3c587519
authored
8 years ago
by
Federico Vaga
Committed by
federico.vaga@cern.ch
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
sysfs: show interleaving status
Signed-off-by:
Federico Vaga
<
federico.vaga@gmail.com
>
parent
92daf48a
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sysfs.c
+12
-0
12 additions, 0 deletions
sysfs.c
with
12 additions
and
0 deletions
sysfs.c
+
12
−
0
View file @
3c587519
...
@@ -859,6 +859,14 @@ static ssize_t zio_show_pref(struct device *dev,
...
@@ -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
#if ZIO_HAS_BINARY_CONTROL
/*
/*
* zobj_read_cur_ctrl
* zobj_read_cur_ctrl
...
@@ -938,6 +946,7 @@ enum zio_default_attribute_numeration {
...
@@ -938,6 +946,7 @@ enum zio_default_attribute_numeration {
ZIO_DAN_ALAR
,
/* alarms */
ZIO_DAN_ALAR
,
/* alarms */
ZIO_DAN_DIRE
,
/* direction */
ZIO_DAN_DIRE
,
/* direction */
ZIO_DAN_PREF
,
/* prefer-new */
ZIO_DAN_PREF
,
/* prefer-new */
ZIO_DAN_INTE
,
/* interleave */
};
};
/* default zio attributes */
/* default zio attributes */
...
@@ -962,6 +971,8 @@ static struct device_attribute zio_default_attributes[] = {
...
@@ -962,6 +971,8 @@ static struct device_attribute zio_default_attributes[] = {
zio_show_dire
,
NULL
),
zio_show_dire
,
NULL
),
[
ZIO_DAN_PREF
]
=
__ATTR
(
prefer
-
new
,
ZIO_RW_PERM
,
[
ZIO_DAN_PREF
]
=
__ATTR
(
prefer
-
new
,
ZIO_RW_PERM
,
zio_show_pref
,
zio_store_pref
),
zio_show_pref
,
zio_store_pref
),
[
ZIO_DAN_INTE
]
=
__ATTR
(
interleave
,
ZIO_RW_PERM
,
zio_show_inte
,
NULL
),
__ATTR_NULL
,
__ATTR_NULL
,
};
};
/* default attributes for most of the zio objects */
/* default attributes for most of the zio objects */
...
@@ -986,6 +997,7 @@ static struct attribute *def_cset_attrs_ptr[] = {
...
@@ -986,6 +997,7 @@ static struct attribute *def_cset_attrs_ptr[] = {
/* default attributes for channel */
/* default attributes for channel */
static
struct
attribute
*
def_chan_attrs_ptr
[]
=
{
static
struct
attribute
*
def_chan_attrs_ptr
[]
=
{
&
zio_default_attributes
[
ZIO_DAN_ALAR
].
attr
,
&
zio_default_attributes
[
ZIO_DAN_ALAR
].
attr
,
&
zio_default_attributes
[
ZIO_DAN_INTE
].
attr
,
NULL
,
NULL
,
};
};
/* default attributes for buffer instance */
/* default attributes for buffer instance */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment