The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

Поиск:  Каталог документации

Next Previous Contents

7. Opening The Device

A generic device has to be opened for read and write access:

        int fd = open (device_name, O_RDWR);

(This is the case even for a read-only hardware device such as a cdrom drive).

We have to perform a write to send the command and a read to get back any results. In the case of an error the return code is negative (see section sec-errorhandling for a complete list).


Next Previous Contents


Спонсоры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2022 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру