linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.15-rc5] media/video/bttv : enhance ioctl debug
@ 2005-12-08 21:05 Philippe De Muyter
  2005-12-12 10:36 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe De Muyter @ 2005-12-08 21:05 UTC (permalink / raw)
  To: linux-kernel

This patch adds the current process name in the media/video/bttv ioctl debug.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>

---

--- linux/drivers/media/video/bttv-driver.c.orig	2005-08-29 01:41:01.000000000 +0200
+++ linux/drivers/media/video/bttv-driver.c	2005-12-08 20:59:45.000000000 +0100
@@ -2181,19 +2182,19 @@ static int bttv_do_ioctl(struct inode *i
 	int retval = 0;
 
 	if (bttv_debug > 1) {
+		printk("bttv%d: %s: ioctl 0x%x ", btv->c.nr, current->comm,
+			cmd);
 		switch (_IOC_TYPE(cmd)) {
 		case 'v':
-			printk("bttv%d: ioctl 0x%x (v4l1, VIDIOC%s)\n",
-			       btv->c.nr, cmd, (_IOC_NR(cmd) < V4L1_IOCTLS) ?
+			printk("(v4l1, VIDIOC%s)\n",
+			       (_IOC_NR(cmd) < V4L1_IOCTLS) ?
 			       v4l1_ioctls[_IOC_NR(cmd)] : "???");
 			break;
 		case 'V':
-			printk("bttv%d: ioctl 0x%x (v4l2, %s)\n",
-			       btv->c.nr, cmd,  v4l2_ioctl_names[_IOC_NR(cmd)]);
+			printk("(v4l2, %s)\n", v4l2_ioctl_names[_IOC_NR(cmd)]);
 			break;
 		default:
-			printk("bttv%d: ioctl 0x%x (???)\n",
-			       btv->c.nr, cmd);
+			printk("(???)\n");
 		}
 	}
 	if (btv->errors)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2.6.15-rc5] media/video/bttv : enhance ioctl debug
  2005-12-08 21:05 [PATCH 2.6.15-rc5] media/video/bttv : enhance ioctl debug Philippe De Muyter
@ 2005-12-12 10:36 ` Mauro Carvalho Chehab
  2005-12-14 16:42   ` Philippe De Muyter
  0 siblings, 1 reply; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2005-12-12 10:36 UTC (permalink / raw)
  To: Philippe De Muyter; +Cc: linux-kernel, Linux and Kernel Video

Em Qui, 2005-12-08 às 22:05 +0100, Philippe De Muyter escreveu:
> This patch adds the current process name in the media/video/bttv ioctl debug.

	Philippe, 

	I'm in doubt about the relevance of this patch. Why do you think it is
important to have process name at ioctl debug?

	PS.: Please address these patches to V4L Mailing List.
> 
> Signed-off-by: Philippe De Muyter <phdm@macqel.be>
> 
> ---
> 
> --- linux/drivers/media/video/bttv-driver.c.orig	2005-08-29 01:41:01.000000000 +0200
> +++ linux/drivers/media/video/bttv-driver.c	2005-12-08 20:59:45.000000000 +0100
> @@ -2181,19 +2182,19 @@ static int bttv_do_ioctl(struct inode *i
>  	int retval = 0;
>  
>  	if (bttv_debug > 1) {
> +		printk("bttv%d: %s: ioctl 0x%x ", btv->c.nr, current->comm,
> +			cmd);
>  		switch (_IOC_TYPE(cmd)) {
>  		case 'v':
> -			printk("bttv%d: ioctl 0x%x (v4l1, VIDIOC%s)\n",
> -			       btv->c.nr, cmd, (_IOC_NR(cmd) < V4L1_IOCTLS) ?
> +			printk("(v4l1, VIDIOC%s)\n",
> +			       (_IOC_NR(cmd) < V4L1_IOCTLS) ?
>  			       v4l1_ioctls[_IOC_NR(cmd)] : "???");
>  			break;
>  		case 'V':
> -			printk("bttv%d: ioctl 0x%x (v4l2, %s)\n",
> -			       btv->c.nr, cmd,  v4l2_ioctl_names[_IOC_NR(cmd)]);
> +			printk("(v4l2, %s)\n", v4l2_ioctl_names[_IOC_NR(cmd)]);
>  			break;
>  		default:
> -			printk("bttv%d: ioctl 0x%x (???)\n",
> -			       btv->c.nr, cmd);
> +			printk("(???)\n");
>  		}
>  	}
>  	if (btv->errors)
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2.6.15-rc5] media/video/bttv : enhance ioctl debug
  2005-12-12 10:36 ` Mauro Carvalho Chehab
@ 2005-12-14 16:42   ` Philippe De Muyter
  0 siblings, 0 replies; 3+ messages in thread
From: Philippe De Muyter @ 2005-12-14 16:42 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-kernel, Linux and Kernel Video

Mauro Carvalho Chehab wrote :
> Em Qui, 2005-12-08 às 22:05 +0100, Philippe De Muyter escreveu:
> > This patch adds the current process name in the media/video/bttv ioctl debug.
> 
> 	Philippe, 
> 
> 	I'm in doubt about the relevance of this patch. Why do you think it is
> important to have process name at ioctl debug?

I needed to add that when testing my v4l2-compat patches with xawtv.  It took
me a long time to discover that some ioctls were issued by xawtv itself,
others by v4l-conf and others yet by the xvideo/v4l module of my Xserver.
With the process name in the ioctl debugging, I think that my tests and
development would have been much faster.

Philippe

> 
> 	PS.: Please address these patches to V4L Mailing List.
> > 
> > Signed-off-by: Philippe De Muyter <phdm@macqel.be>
> > 
> > ---
> > 
> > --- linux/drivers/media/video/bttv-driver.c.orig	2005-08-29 01:41:01.000000000 +0200
> > +++ linux/drivers/media/video/bttv-driver.c	2005-12-08 20:59:45.000000000 +0100
> > @@ -2181,19 +2182,19 @@ static int bttv_do_ioctl(struct inode *i
> >  	int retval = 0;
> >  
> >  	if (bttv_debug > 1) {
> > +		printk("bttv%d: %s: ioctl 0x%x ", btv->c.nr, current->comm,
> > +			cmd);
> >  		switch (_IOC_TYPE(cmd)) {
> >  		case 'v':
> > -			printk("bttv%d: ioctl 0x%x (v4l1, VIDIOC%s)\n",
> > -			       btv->c.nr, cmd, (_IOC_NR(cmd) < V4L1_IOCTLS) ?
> > +			printk("(v4l1, VIDIOC%s)\n",
> > +			       (_IOC_NR(cmd) < V4L1_IOCTLS) ?
> >  			       v4l1_ioctls[_IOC_NR(cmd)] : "???");
> >  			break;
> >  		case 'V':
> > -			printk("bttv%d: ioctl 0x%x (v4l2, %s)\n",
> > -			       btv->c.nr, cmd,  v4l2_ioctl_names[_IOC_NR(cmd)]);
> > +			printk("(v4l2, %s)\n", v4l2_ioctl_names[_IOC_NR(cmd)]);
> >  			break;
> >  		default:
> > -			printk("bttv%d: ioctl 0x%x (???)\n",
> > -			       btv->c.nr, cmd);
> > +			printk("(???)\n");
> >  		}
> >  	}
> >  	if (btv->errors)
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-12-14 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-08 21:05 [PATCH 2.6.15-rc5] media/video/bttv : enhance ioctl debug Philippe De Muyter
2005-12-12 10:36 ` Mauro Carvalho Chehab
2005-12-14 16:42   ` Philippe De Muyter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).