]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
eject: remove list_speeds() #ifdef CDROM_SELECT_SPEED protection
authorSami Kerola <kerolasa@iki.fi>
Sun, 26 Nov 2017 17:47:51 +0000 (17:47 +0000)
committerKarel Zak <kzak@redhat.com>
Tue, 28 Nov 2017 13:39:19 +0000 (14:39 +0100)
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@iki.fi>
sys-utils/eject.c

index aa90ff72f8184ad1ccb2cbca9ad85e0c0938d3cd..a38c5c38cb93c2a109882ac0fb183c82b943a0cd 100644 (file)
@@ -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
 }
 
 /*