View topic - TTYDEV structure of io-char
TTYDEV structure of io-char
2 posts
• Page 1 of 1
TTYDEV structure of io-char
Hi,
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.
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.
- anvesh
- Active Member
- Posts: 31
- Joined: Wed Dec 03, 2008 6:57 am
RE: TTYDEV structure of io-char
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.
- maschoen
- QNX Master
- Posts: 2728
- Joined: Wed Jun 25, 2003 5:18 pm
2 posts
• Page 1 of 1
Return to Realtime and Embedded
Who is online
Users browsing this forum: No registered users and 2 guests