Commit d48cb402 authored by Steven Toth's avatar Steven Toth Committed by Mauro Carvalho Chehab

V4L/DVB (9071): S2API: Implement result codes for individual commands

This allows application developers to determine which particular
command in a sequence is invalid, or failing with error.
Signed-off-by: default avatarSteven Toth <stoth@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 459702bf
...@@ -1262,8 +1262,10 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, ...@@ -1262,8 +1262,10 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
goto out; goto out;
} }
for (i = 0; i < tvps->num; i++) for (i = 0; i < tvps->num; i++) {
err |= dtv_property_process_set(fe, tvp + i, inode, file); (tvp + i)->result = dtv_property_process_set(fe, tvp + i, inode, file);
err |= (tvp + i)->result;
}
if(fe->dtv_property_cache.state == DTV_TUNE) { if(fe->dtv_property_cache.state == DTV_TUNE) {
printk("%s() Property cache is full, tuning\n", __FUNCTION__); printk("%s() Property cache is full, tuning\n", __FUNCTION__);
...@@ -1295,8 +1297,10 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, ...@@ -1295,8 +1297,10 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
goto out; goto out;
} }
for (i = 0; i < tvps->num; i++) for (i = 0; i < tvps->num; i++) {
err |= dtv_property_process_get(fe, tvp + i, inode, file); (tvp + i)->result = dtv_property_process_get(fe, tvp + i, inode, file);
err |= (tvp + i)->result;
}
if (copy_to_user(tvps->props, tvp, tvps->num * sizeof(struct dtv_property))) { if (copy_to_user(tvps->props, tvp, tvps->num * sizeof(struct dtv_property))) {
err = -EFAULT; err = -EFAULT;
......
...@@ -323,6 +323,7 @@ struct dtv_property { ...@@ -323,6 +323,7 @@ struct dtv_property {
void *reserved2; void *reserved2;
} buffer; } buffer;
} u; } u;
int result;
} __attribute__ ((packed)); } __attribute__ ((packed));
/* No more than 16 properties during any given ioctl */ /* No more than 16 properties during any given ioctl */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment