Re: [PATCH] eject: set CD-ROM speed to auto when xargs < 0

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

 



On Thu, Apr 14, 2022 at 05:46:27PM +0800, Enze Li wrote:
> when I execute the following command,
> $ ./eject -x -1 -v
> 
> I get this output info,
> eject: using default device `/dev/sr0'
> eject: device name is `/dev/sr0'
> eject: /dev/sr0: not mounted
> eject: /dev/sr0: is whole-disk device
> eject: setting CD-ROM speed to -1X
>                                ^^^

I have fixed this in a different way. 

https://github.com/util-linux/util-linux/commit/3b888573661d43ea069e98a083bd10e33a2ece69

The problem is that it uses ctl->x_arg = strtoul_or_err() -- so
non-negative number is expected, but strtoul_or_err() does not work in
this way ...

Now:

    # ./eject -x -1 -v
    eject: invalid argument to --cdspeed/-x option: '-1': Numerical result out of range


 Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com




[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