Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S268019AbUIKBYw (ORCPT ); Fri, 10 Sep 2004 21:24:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S268020AbUIKBYw (ORCPT ); Fri, 10 Sep 2004 21:24:52 -0400 Received: from e33.co.us.ibm.com ([32.97.110.131]:31159 "EHLO e33.co.us.ibm.com") by vger.kernel.org with ESMTP id S268019AbUIKBYu (ORCPT ); Fri, 10 Sep 2004 21:24:50 -0400 Subject: Re: [patch] kernel sysfs events layer From: Daniel Stekloff To: Greg KH Cc: Tim Hockin , Kay Sievers , Robert Love , akpm@osdl.org, linux-kernel@vger.kernel.org In-Reply-To: <20040911004827.GA8139@kroah.com> References: <20040831150645.4aa8fd27.akpm@osdl.org> <1093989924.4815.56.camel@betsy.boston.ximian.com> <20040902083407.GC3191@kroah.com> <1094142321.2284.12.camel@betsy.boston.ximian.com> <20040904005433.GA18229@kroah.com> <1094353088.2591.19.camel@localhost> <20040905121814.GA1855@vrfy.org> <20040906020601.GA3199@vrfy.org> <20040910235409.GA32424@kroah.com> <20040911001849.GA321@hockin.org> <20040911004827.GA8139@kroah.com> Content-Type: text/plain Message-Id: <1094865815.2772.67.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Fri, 10 Sep 2004 18:23:36 -0700 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1555 Lines: 39 On Fri, 2004-09-10 at 17:48, Greg KH wrote: > On Fri, Sep 10, 2004 at 05:18:49PM -0700, Tim Hockin wrote: > > On Fri, Sep 10, 2004 at 04:54:09PM -0700, Greg KH wrote: > > > To send an event, the user needs to pass the kobject, a optional > > > sysfs-attribute and the signal string to the following function: > > > > > > kobject_uevent(const char *signal, > > > struct kobject *kobj, > > > struct attribute *attr) > > > > Sorry I missed the flare up of this topic. What about events for which > > there is no associated kobject? > > Tough, no event for them :) > > > why is the kobject argument not first? Seems weird.. > > Yeah, it is a bit "odd", but it follows my old kobject_hotplug() way. > > > What happened to a formatted string argument? The signal argument can > > become the pre-formatted string, and someone can provide a wrapper > > that takes a printf() like format and args. > > kobject_uevent_printf(kobj, "something bad: 0x%08x", err); > > Use an attribute, and have userspace read that formatted argument if > need be. This keeps the kernel interface much simpler, and doesn't > allow you to abuse it for things it is not intended for (like error > reporting stuff...) Not to be cheeky, but cpu "overheating" isn't an error event? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/