[procps] Re: newlib pids status

  • From: Jim Warner <james.warner@xxxxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Sun, 16 Aug 2015 03:30:23 -0500


On Aug 15, 2015, at 11:34 PM, Craig Small <csmall@xxxxxxxxxx> wrote:
Is that a 3 spaces is a tab versus 4 spaces is a tab question?

Whoa Craig,

The use of *any* tab is a felony, so there’s no comparison. Anyway, this is
the call I had screwed up, where PROCPS_SORT_DESCEND was originally specified.

#ifndef TREE_SCANALL
if (!(procps_pids_stacks_sort(Pids_ctx, Seed_ppt, Frame_maxtask
, PROCPS_PIDS_TIME_START, PROCPS_SORT_ASCEND)))
error_exit(N_txt(LIB_errorpid_txt));
#endif

Just imagine how many sort callbacks will be eliminated in just the top and ps
programs now that the library can sort *all* current fields and *any* future
additions with only 9 callback functions.

Anyone tried my cgname update yet?
I have made some outrageous assumptions about what that looks like.

I don’t see anything too outrageous. Maybe this should be rolled into newlib.

Also why pretend its a vectored string when its not? Something for newlib to
fix?
It looks to me to be a simple matter of s/\n//g and you're done.

There are no vectored stings in my newlib <proc/pids.h> implementation. Here’s
the final result structure:

struct pids_result {
enum pids_item item;
union {
char s_ch;
int s_int;
unsigned int u_int;
long sl_int;
unsigned long ul_int;
unsigned long long ull_int;
void * p_void;
const char * str;
} result;
};

Regards,
Jim


Other related posts: