From: php-coder <php-coder@ngs.ru>
To: Андрей <community@altlinux.ru>
Subject: Re[2]: [Comm] Программирование в c++
Date: Tue, 20 Jul 2004 15:34:48 +0700
Message-ID: <201947723.20040720153448@ngs.ru> (raw)
In-Reply-To: <20040720090059.001c910f.f0rk@mail.ru>
0000100101011110100100101::20.07.2004::0110001001001000100111100100010
Здравствуйте, Андрей!
Отвечаю на Ваше письмо:
> int main ()
> {
> CDROMEJECT;
> }
:)) CDROMEJECT - это объявленная в заголовочном файле константа.
При компиляции макропроцессор вместо нее подставит число в
восьмеричной системе счисления.
Чтобы сделать как вы задумали, нужно сначала открыть это
устройство (/dev/cdrom), при помощи open(). Аргументы можно
увидеть в заголовочнике <linux/cdrom/.h>
Далее нужно воспользоваться функцией ioctl(). В качестве одного из
параметров, которой и передать константу CDROMEJECT.
Если нужно, то могу прислать вам завтра готовый и работающий
пример...
> Или где почитать про это?
В исходниках ядра и/или программ, работающих с CD-ROM'ом (к
примеру, cdparanoia, cdplay или cdctl), а также man'ах (man open, man
ioctl).
--
С уважением, php-coder (mailto:php-coder[at]ngs[dot]ru)
Registered Linux User #327594
ALT Linux Master 2.2
010010010010010001010101100::Linux RuleZz!::100010010001000100010001110
prev parent reply other threads:[~2004-07-20 8:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-20 9:00 Андрей
2004-07-20 8:34 ` php-coder [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201947723.20040720153448@ngs.ru \
--to=php-coder@ngs.ru \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git