RE: [PATCH 10/15] prlimit: refactor code: separate modify and show clearly

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

 



Karel Zak wrote:

> On Mon, Nov 14, 2011 at 02:48:37AM +0100, Bernhard Voelker wrote:
> >  struct prlimit {
> >  	struct rlimit rlim;
> > -	int found;
> >  	struct prlimit_desc *desc;
> >  	int modify;
> > +	int show;
> >  };
> 
>  I think that 'modify == 0' means 'show'. It's strange to add two
>  variables to differentiate between two states.

As modifying and showing a limit was done in the same place, and
as the two actions are now separated (at least) more, 'modify == 1'
means the the limit is changed while 'show == 1' means the limit
has to be displayed. (In the previous code, the array item was only
processed if it was on the command line via the "n" loop.

Berny--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux