projects
/
comedilib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3dd23bc
)
Get rid of spurious "subdevice does not support commands" warnings.
author
David Schleef
<ds@schleef.org>
Fri, 10 May 2002 19:08:58 +0000
(19:08 +0000)
committer
David Schleef
<ds@schleef.org>
Fri, 10 May 2002 19:08:58 +0000
(19:08 +0000)
demo/info.c
patch
|
blob
|
history
diff --git
a/demo/info.c
b/demo/info.c
index bc99af1efae0d6f25988a9c5cd6b42c91af332cf..7b3b7e21486b71d9b9548cb395feaedc976cb0e1 100644
(file)
--- a/
demo/info.c
+++ b/
demo/info.c
@@
-123,6
+123,10
@@
int comedi_get_cmd_src_mask(comedi_t *it,unsigned int s,comedi_cmd *cmd)
{
memset(cmd,0,sizeof(*cmd));
+ if(!(comedi_get_subdevice_flags(it,s)&SDF_CMD)){
+ return -1;
+ }
+
cmd->subdev = s;
cmd->flags = 0;
@@
-141,7
+145,8
@@
int comedi_get_cmd_fast_1chan(comedi_t *it,unsigned int s,comedi_cmd *cmd)
{
int ret;
- comedi_get_cmd_src_mask(it,s,cmd);
+ ret = comedi_get_cmd_src_mask(it,s,cmd);
+ if(ret<0)return ret;
cmd->chanlist_len = 1;