About the returned value of the driver

Source: Internet
Author: User
About the returned value of the driver-Linux general technology-Linux programming and kernel information, the following is a detailed description. Dear fellow students and beginners, I have never been very familiar with this. in general linux drivers, such as the compilation of open functions, return 0 at the end, however, the corresponding open function in the application returns a non-zero file descriptor value, according to the original understanding of the C language, the return value of a function should be its return value. I don't understand why the open function does not always return 0? What is the difference between the return value in other drivers, such as read, write, and ioctl, and the return value in the application? I hope you will be enlightened to familiarize yourself with linux programming as soon as possible!
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.