Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

print(9e) [sunos man page]

print(9E)							Driver Entry Points							 print(9E)

NAME
print - display a driver message on system console SYNOPSIS
#include <sys/types.h> #include <sys/errno.h> #include <sys/ddi.h> #include <sys/sunddi.h> int prefixprint(dev_t dev, char *str); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). This entry point is required for block devices. PARAMETERS
dev Device number. str Pointer to a character string describing the problem. DESCRIPTION
The print() routine is called by the kernel when it has detected an exceptional condition (such as out of space) in the device. To display the message on the console, the driver should use the cmn_err(9F) kernel function. The driver should print the message along with any driver specific information. RETURN VALUES
The print() routine should return 0 for success, or the appropriate error number. The print routine can fail if the driver implemented a non-standard print() routine that attempted to perform error logging, but was unable to complete the logging for whatever reason. SEE ALSO
cmn_err(9F) Writing Device Drivers SunOS 5.10 15 Sep 1992 print(9E)

Check Out this Related Man Page

getmajor(9F)						   Kernel Functions for Drivers 					      getmajor(9F)

NAME
getmajor - get major device number SYNOPSIS
#include <sys/types.h> #include <sys/mkdev.h> #include <sys/ddi.h> major_t getmajor(dev_t dev); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
dev Device number. DESCRIPTION
getmajor() extracts the major number from a device number. RETURN VALUES
The major number. CONTEXT
getmajor() can be called from user or interrupt context. EXAMPLES
Example 1: Using getmajor() The following example shows both the getmajor() and getminor(9F) functions used in a debug cmn_err(9F) statement to return the major and minor numbers for the device supported by the driver. dev_t dev; #ifdef DEBUG cmn_err(CE_NOTE,"Driver Started. Major# = %d, Minor# = %d", getmajor(dev), getminor(dev)); #endif SEE ALSO
cmn_err(9F), getminor(9F), makedevice(9F) Writing Device Drivers WARNINGS
No validity checking is performed. If dev is invalid, an invalid number is returned. SunOS 5.10 11 Apr 1991 getmajor(9F)
Man Page

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

need help getting console driver number(index)

Well, i have a little problem here. I am given device "console" of symbolical type. I do need to get its driver's number (index ?) Your help would be greatly appreciated thx, axujet (1 Reply)
Discussion started by: axujet
1 Replies

2. UNIX for Dummies Questions & Answers

cannot print from an application but, i can print from others?

I am trying to print from an application but it will not let me and when I click on the print option a 2nd time it crashes the program. I can print fine from the other applications on my system though, any ideas? (1 Reply)
Discussion started by: 75ping6
1 Replies

3. Shell Programming and Scripting

print or display certain number of file

Hi, I am sure this is possible in awk or sed or a combination of the two. Can someone help me determine the best way to display or print certain section of a file, ie only certain number of lines. Example: File1 1 has 20 lines. I need to be able to print from line 5 to line 10 of this file.... (2 Replies)
Discussion started by: jerardfjay
2 Replies

4. Shell Programming and Scripting

print first number in each line

I have a file such as: .....12345......67890...xxx ....123456....78901...yyy ...1234567...89012...zzz ..12345678.90123...aaa Where the '.' character is a SPACE. I'm trying to print just the first number in each line. such as: 12345 123456 1234567 12345678 Both the number of... (1 Reply)
Discussion started by: dcfargo
1 Replies

5. Shell Programming and Scripting

Error while trying to print message

Hi all Geting this error while trying to print message as : ./logfunc: print: bad file unit number heres what i m trying to do : log_date="$(date '+%d/%m/%Y %H:%M:%S')" log_type="Message" print "${log_date}: ${log_type}" print -u3 "${log_date}: ${log_type}" this error is due to... (3 Replies)
Discussion started by: Navatha
3 Replies

6. Shell Programming and Scripting

Need to print only selected char in a string..?

Hi, I want to print particular chars in a string. for example ie., consider " dear,. roopa$#09%~`';']" as the example string. Here, I want to print only alphanumeric chars.. suppose , if i want only alphanumeric... value would be "dear roopa09" suppose , if i want some spl char(,) with... (2 Replies)
Discussion started by: balan_mca
2 Replies

7. Shell Programming and Scripting

How to print string on screen according the fixed length?

Problem: entry_name="joke:hello:yellow:blue:default" print("%d %-12s\t%-10s\t%-5s\n", $i, $entry_name....); I just want to print the output like this index entry value .... 1 joke:hello:y 0 123 567 ellow:blue:d ... (1 Reply)
Discussion started by: a2156z
1 Replies

8. Shell Programming and Scripting

Uppercase word in PERL

how do i print uppercase words in a string in PERL For example $str=" welcome to UNIX programming" should print UNIX $str="WELCOME to unix programming" should print WELCOME i itried the following /\s+\w+\b/ $str Can u help me in to get a uppercase word in PERL (3 Replies)
Discussion started by: vkca
3 Replies