Re: [PATCH] cdrom: do not print info list when there is no cdrom device

From: Jens Axboe
Date: Fri Apr 08 2022 - 08:34:14 EST


On 4/8/22 2:42 AM, Enze Li wrote:
> There is no need to print a list of cdrom entries with blank info when
> no cdrom device exists. With this patch applied, we get:
>
> ================================================
> $ cat /proc/sys/dev/cdrom/info
> CD-ROM information, Id:cdrom.c 3.20 2003/12/17
>
> No device found.
>
> ================================================

And what did we get before?

Will this potentially break applications that parse it?

--
Jens Axboe