Re: [RFC/PATCH] Nonotify - A simplistic way to determine directory content changes
- From: Mathieu Lacage <mathieu_lacage myrealbox com>
- To: "Manuel Amador (Rudd-O)" <amadorm usm edu ec>
- Cc: Nautilus mailing <nautilus-list gnome org>, nf2 scheinwelt at
- Subject: Re: [RFC/PATCH] Nonotify - A simplistic way to determine directory content changes
- Date: Sat, 05 Jun 2004 08:54:51 +0200
On Fri, 2004-06-04 at 19:21, Manuel Amador (Rudd-O) wrote:
> Only one question remains. Does nonotify require open fds? I mean,
> will it block cdrom ejection? =)
That is clearly the wrong question: there can be no relationship between
open fds on a mounted cdrom and cdrom locking.
From:
Ikke
<eikke eikke com>
To:
hal freedesktop org
Subject:
Re: Unmounting and
'eject' press
Date:
Thu, 3 Jun 2004
14:45:00 +0200
Ok, I did the testings.
To unlock the tray: very simple
#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/cdrom.h>
int main()
{
int fd;
fd = open("/dev/hdc", O_RDONLY | O_NONBLOCK);
if (fd == -1) {
perror("open");
return 1;
}
if(ioctl(fd, CDROM_LOCKDOOR, 0) < 0)
perror("cdrom tray lock");
return 0;
}
gcc -o test test.c
mount /mnt/cdrom
./test
(press eject, cd ejects, I get error messages in syslog)
Mathieu
--
Mathieu Lacage <mathieu gnu org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]