lkml.org 
[lkml]   [2021]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 3/8] block: Add kernel APIs to create & delete block device LED triggers
From
Date
On 7/28/21 10:45 PM, Valdis Klētnieks wrote:
> Is pr_warn() the right level for this stuff? I'd think this sort of pilot error should
> be pr_info() or even pr_debug(), if mentioned at all. pr_warn() would be for
> something like an unexpected situation like trying to blink an LED but failing.
> Simple syntax errors should probably just toss a -EINVAL and return.

Fair point. I'll change it to pr_info(). I'm reluctant to completely
"swallow" the error message, as I've been on the other side as a system
administrator trying to guess at the reason for an error code.

> (Among other things, this allows a userspace script to spam the
> log by simply repeatedly trying to create the same entry)

Only root, and they've got plenty of ways to do that.

Thanks!

--
========================================================================
In Soviet Russia, Google searches you!
========================================================================

\
 
 \ /
  Last update: 2021-07-29 18:17    [W:0.063 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site