linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Debug output
@ 2011-12-01  0:46 damateem
  2011-12-01 19:01 ` damateem
  0 siblings, 1 reply; 3+ messages in thread
From: damateem @ 2011-12-01  0:46 UTC (permalink / raw)
  To: linux-media list

There are a fair number of debug print statements in the V4L2 code. How
do I turn those on?

For instance, I'd like the following code to print

if ((vfd->debug & V4L2_DEBUG_IOCTL) &&
                !(vfd->debug & V4L2_DEBUG_IOCTL_ARG)) {
        v4l_print_ioctl(vfd->name, cmd);
        printk(KERN_CONT "\n");
    }

so I can trace the IOCTL calls.

Thanks,
David

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

* Re: Debug output
  2011-12-01  0:46 Debug output damateem
@ 2011-12-01 19:01 ` damateem
  2011-12-01 19:18   ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 3+ messages in thread
From: damateem @ 2011-12-01 19:01 UTC (permalink / raw)
  To: linux-media list

Ok, if I set debug as follows

vfd->debug =V4L2_DEBUG_IOCTL | V4L2_DEBUG_IOCTL_ARG;

I can see the debug trace in dmesg, but this doesn't seem like the
correct way to set the flags.

What is the typical method of setting these debug flags?

Is this the best place to ask these type of questions?

Thanks,
David


On 11/30/2011 7:46 PM, damateem wrote:
> There are a fair number of debug print statements in the V4L2 code. How
> do I turn those on?
>
> For instance, I'd like the following code to print
>
> if ((vfd->debug & V4L2_DEBUG_IOCTL) &&
>                 !(vfd->debug & V4L2_DEBUG_IOCTL_ARG)) {
>         v4l_print_ioctl(vfd->name, cmd);
>         printk(KERN_CONT "\n");
>     }
>
> so I can trace the IOCTL calls.
>
> Thanks,
> David

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

* Re: Debug output
  2011-12-01 19:01 ` damateem
@ 2011-12-01 19:18   ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2011-12-01 19:18 UTC (permalink / raw)
  To: damateem; +Cc: linux-media list

On 01-12-2011 17:01, damateem wrote:
> Ok, if I set debug as follows
>
> vfd->debug =V4L2_DEBUG_IOCTL | V4L2_DEBUG_IOCTL_ARG;
>
> I can see the debug trace in dmesg, but this doesn't seem like the
> correct way to set the flags.

In general, what it is none is to add a debug modprobe parameter that
would enable those logs with something like:

static unsigned int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "debug message mask (1 = ioctl, 2 = ioctl args)");


...
	vfd->debug = debug;

>
> What is the typical method of setting these debug flags?
>
> Is this the best place to ask these type of questions?
>
> Thanks,
> David
>
>
> On 11/30/2011 7:46 PM, damateem wrote:
>> There are a fair number of debug print statements in the V4L2 code. How
>> do I turn those on?
>>
>> For instance, I'd like the following code to print
>>
>> if ((vfd->debug&  V4L2_DEBUG_IOCTL)&&
>>                  !(vfd->debug&  V4L2_DEBUG_IOCTL_ARG)) {
>>          v4l_print_ioctl(vfd->name, cmd);
>>          printk(KERN_CONT "\n");
>>      }
>>
>> so I can trace the IOCTL calls.
>>
>> Thanks,
>> David
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

end of thread, other threads:[~2011-12-01 19:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-01  0:46 Debug output damateem
2011-12-01 19:01 ` damateem
2011-12-01 19:18   ` Mauro Carvalho Chehab

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).