Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 135229
Collapse All | Expand All

(-)eject.c.orig (-1 / +8 lines)
Lines 656-662 Link Here
656
/* Open a device file. */
656
/* Open a device file. */
657
static int OpenDevice(const char *fullName)
657
static int OpenDevice(const char *fullName)
658
{
658
{
659
	int fd = open(fullName, O_RDONLY|O_NONBLOCK);
659
	int flags = O_NONBLOCK;
660
	int fd;
661
	if (s_option) {
662
		flags |= O_RDWR;
663
	} else {
664
		flags |= O_RDONLY;
665
	}
666
	fd = open(fullName, flags);
660
	if (fd == -1) {
667
	if (fd == -1) {
661
		fprintf(stderr, _("%s: unable to open `%s'\n"), programName, fullName);
668
		fprintf(stderr, _("%s: unable to open `%s'\n"), programName, fullName);
662
		exit(1);
669
		exit(1);

Return to bug 135229