[PATCH] kdump: Add udev events for memory online/offline

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

 



On Fri, 2011-10-28 at 15:41 -0700, Andrew Morton wrote:
> > +     } else if (!strncmp(buf, "offline", min((int)count, 7))) {
> >               ret = memory_block_change_state(mem, MEM_OFFLINE, MEM_ONLINE);
> > -
> > +             if (ret == 0)
> > +                     kobject_uevent(&dev->kobj, KOBJ_OFFLINE);
> > +     }
> 
> ot: what on earth is up with that min() thing which
> Dave-who-doesn't-know-about-min_t added to the strncmp() calls?

My first reaction was, "that's not my code!", but git seems to disagree
with me.  So I'll go and blame it on being young and stupid in 2005.

Reading it, I also think it's probably buggy.

	echo -n "o" > state
 
would be interesting.  I think it'll fall in to the 'online' case.
While probably not that common, it's certainly unexpected.  I'll send a
patch to fix it up.

-- Dave




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux