Fix 'show' command for pipes and queues.

PR:		bin/70311
Submitted by:	Pawel Malachowski <pawmal-posting@freebsd.lublin.pl>
MFC after:	3 days
This commit is contained in:
Pawel Jakub Dawidek 2004-08-23 19:20:27 +00:00
parent e3e49f7e32
commit c3d6fe74a7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134225

View File

@ -1530,7 +1530,7 @@ list_pipes(void *data, uint nbytes, int ac, char *av[])
next = (char *)p + l;
nbytes -= l;
if (rulenum != 0 && rulenum != p->pipe_nr)
if ((rulenum != 0 && rulenum != p->pipe_nr) || do_pipe == 2)
continue;
/*
@ -1564,6 +1564,12 @@ list_pipes(void *data, uint nbytes, int ac, char *av[])
l = sizeof(*fs) + fs->rq_elements * sizeof(*q);
next = (char *)fs + l;
nbytes -= l;
if (rulenum != 0 && ((rulenum != fs->fs_nr && do_pipe == 2) ||
(rulenum != fs->parent_nr && do_pipe == 1))) {
continue;
}
q = (struct dn_flow_queue *)(fs+1);
sprintf(prefix, "q%05d: weight %d pipe %d ",
fs->fs_nr, fs->weight, fs->parent_nr);