Browse Source

test mytop

master
10195501441 3 years ago
parent
commit
ccc95c65c6
1 changed files with 2 additions and 11 deletions
  1. +2
    -11
      yeeshell.c

+ 2
- 11
yeeshell.c View File

@ -354,16 +354,7 @@ int built_in(char **args)
} }
else if (!strcmp(args[0], "mytop")) else if (!strcmp(args[0], "mytop"))
{ {
int flag = builtin_mytop();
if (flag == -1)
{
printf("yeeshell: unable to get memory info.\n");
}
else if (flag == -2)
{
printf("yeeshell: unable to get CPU info.\n");
}
return flag;
return builtin_mytop();
} }
else else
{ {
@ -549,7 +540,7 @@ void parse_file(pid_t pid)
if (slot < 0 || slot >= nr_total) if (slot < 0 || slot >= nr_total)
{ {
fprintf(stderr, "top: unreasonable endpoint number %d\n", endpt);
//fprintf(stderr, "top: unreasonable endpoint number %d\n", endpt);
fclose(fp); fclose(fp);
return; return;
} }

Loading…
Cancel
Save