lkml.org 
[lkml]   [2008]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: rlim in proc/<pid>/status
    Hi

    sound good for me.
    a few question please.

    > + for (i=0; i<RLIM_NLIMITS; i++) {
    > + if (rlim_names[i])
    > + buffer += sprintf(buffer, "Rlim%s:\t", rlim_names[i]);
    > + else
    > + buffer += sprintf(buffer, "Rlim%d:\t", i);

    this else is really necessary?

    > + if (rlim[i].rlim_cur != ~0)
    > + buffer += sprintf(buffer, "%lu\t", rlim[i].rlim_cur);
    > + else
    > + buffer += sprintf(buffer, "-\t");
    > + if (rlim[i].rlim_max != ~0)
    > + buffer += sprintf(buffer, "%lu\n", rlim[i].rlim_max);
    > + else
    > + buffer += sprintf(buffer, "-\n");

    Why do you don't use RLIM_INFINITY?

    - kosaki




    \
     
     \ /
      Last update: 2008-01-15 11:49    [W:0.020 / U:46.292 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site