View topic - TTYDEV structure of io-char

TTYDEV structure of io-char

For discussion of realtime and/or embedded programming.

TTYDEV structure of io-char

Postby anvesh » Tue Dec 08, 2009 10:21 am

In io-char.h file, TTYDEV structure has a variable "verbose" as defined below:
int verbose; /* Driver verbosity */
Based on the value of this variable, logging is done with slogf as information, error, debug etc... A sample:
if (ttydev.verbose > 4)
slogf (_SLOG_SETCODE (_SLOGC_CHAR, 0), _SLOG_DEBUG1, "%s: received intr", __FUNCTION__);

I'm unable to understand what is the significance and on what operation the value of this variable is set ?
Any input is highly appreciated.
Thanks in advance.
Active Member
Posts: 31
Joined: Wed Dec 03, 2008 6:57 am

RE: TTYDEV structure of io-char

Postby maschoen » Tue Dec 08, 2009 4:29 pm

I'm not looking at the code, but I'll bet either there is a startup parameter, or you have to manually set it and compile it into the code. It's function is obviously to set the level of messages sent to the system logger, and obviously a value greater than 4 means the driver is being debugged. It's kind to ifdef these kinds of debug messages out of the production version, and it looks like io-char.h may not do this.
QNX Master
Posts: 2728
Joined: Wed Jun 25, 2003 5:18 pm

Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 2 guests