[PATCH 3/3] eject: remove list_speeds() #ifdef CDROM_SELECT_SPEED protection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The CDROM_SELECT_SPEED should be available practically everywhere.  Where
the define is missing an error message about path /proc/sys/dev/cdrom/info
cannot be opened is better error than a warnx() about kernel support.

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 sys-utils/eject.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/sys-utils/eject.c b/sys-utils/eject.c
index aa90ff72f..a38c5c38c 100644
--- a/sys-utils/eject.c
+++ b/sys-utils/eject.c
@@ -548,7 +548,6 @@ static int read_speed(const char *devname)
  */
 static void list_speeds(struct eject_control *ctl)
 {
-#ifdef CDROM_SELECT_SPEED
 	int max_speed, curr_speed = 0;
 
 	select_speed(ctl);
@@ -565,9 +564,6 @@ static void list_speeds(struct eject_control *ctl)
 	}
 
 	printf("\n");
-#else
-	warnx(_("CD-ROM select speed command not supported by this kernel"));
-#endif
 }
 
 /*
-- 
2.15.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux