> Something along the lines of (quickly hashed together, caution...): > > static int > cmd_linecount(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) > { > mdb_pipe_t p; > > if (!(flags & DCMD_PIPE)) > return (DCMD_USAGE); > > mdb_get_pipe(&p); > mdb_printf("%d\n", p.pipe_len); > return (DCMD_OK); > }
Yes, this is exactly the implementation I had come up with as well, but it has the problems I previously mentioned. -- meem