From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marek Lindner Date: Wed, 6 Mar 2013 18:53:02 +0800 References: <1362565981-31117-1-git-send-email-ordex@autistici.org> In-Reply-To: <1362565981-31117-1-git-send-email-ordex@autistici.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201303061853.03020.lindner_marek@yahoo.de> Subject: Re: [B.A.T.M.A.N.] [RFC 1/2] batman-adv: invoke post_func only if the attribute has been changed Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: The list for a Better Approach To Mobile Ad-hoc Networking On Wednesday, March 06, 2013 18:33:00 Antonio Quartulli wrote: > @@ -169,7 +169,7 @@ __batadv_store_bool_attr(char *buff, size_t count, > > ret = batadv_store_bool_attr(buff, count, net_dev, attr->name, > attr_store); > - if (post_func && ret) > + if (post_func && ret > 0) > post_func(net_dev); > > return ret; If I remember correctly the shell or some other system between the kernel and userspace did not like to have 0 returned. It resulted in some funny "try to set this value over and over" reaction. You might want to test that. Cheers, Marek