Re: exit from log_printf()

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

 



Hi, Lucas!

>>>>> On Tue, 28 Apr 2020 23:44:03 -0700, Lucas De Marchi  wrote:

 > On Mon, Apr 27, 2020 at 5:31 AM Yauheni Kaliuta
 > <yauheni.kaliuta@xxxxxxxxxx> wrote:
 >> 
 >> Hi, Lucas!
 >> 
 >> I have a question about exit call from tools/log.c:log_printf()
 >> (https://github.com/lucasdemarchi/kmod/blob/master/tools/log.c#L140)
 >> 
 >> What is the reasoning behind that?
 >> 
 >> At the first glance it looks a bit incorrect (pretty surprising
 >> to have exit in print()).

 > If we log a critical error, there's nothing we can do except
 > exit.  Note that this is only used by the binaries, not the
 > library.

So, it should not be fatal then, right? See the usecase below.


 > There's potential for abuse, but it's pretty common to have
 > something with that behavior.

 > Lucas De Marchi

 >> 
 >> Discovered while trying to remove several modules when one of
 >> them cannod be removed:
 >> 
 >> $ modprobe -r libata pcspkr
 >> modprobe: FATAL: Module libata is in use.
 >> 
 >> $ lsmod | grep pcsp
 >> pcspkr                 16384  0
 >> 
 >> 
 >> --
 >> WBR,
 >> Yauheni Kaliuta
 >> 


 > -- 
 > Lucas De Marchi


-- 
WBR,
Yauheni Kaliuta




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux