Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 May 2001 22:39:47 +0300 (EEST)
From:      Maxim Sobolev <sobomax@mail-in.net>
To:        nik@FreeBSD.ORG
Cc:        nik@FreeBSD.ORG, ru@FreeBSD.ORG, audit@FreeBSD.ORG, arch@FreeBSD.ORG
Subject:   Re: Integrating new scrshot(1) utility into vidcontrol(1) [patch for review]
Message-ID:  <200105191939.f4JJdjr00870@mail.uic-in.net>
In-Reply-To: <20010519194435.A22224@catkin.nothing-going-on.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 19 May 2001 19:44:35 +0100, Nik Clayton wrote:
> On Sat, May 19, 2001 at 02:42:28AM +0300, Maxim Sobolev wrote:
> > Ok, as it was agreed I've integrated scrshot(1) into
> > vidcontrol(1) =

> =

> Any opinions on selecting this option by default if vidcontrol is
> invoked as scrshot?

I don't really think it is worth effort. There is no POLA
to preserve.

> > and also added ability to dump contents
> > of display buffer in plain text format, so you don't
> > even need a special utility to see what's going on
> > on a console of display-less machine. :-)
> =

> Isn't that what watch(8) is for?

No, this and watch(8)'s functionality are ortogonal
because `vidcontrol -P' could be used to dump
what *is* already on the terminal, while watch(8)
what *will* be on terminal after it has been started.

> > +=09if (mode =3D=3D DUMP_RAW) {
> > +=09=09printf("SCRSHOT_%c%c%c%c", DUMP_FMT_REV, 2,
> > +=09=09       shot.xsize, shot.ysize);
> > +=09=09fflush(stdout);
> =

> You've duplicated a buf of mine, "SCRSHOT_" should probably be #define.

Well, frankly speaking I don't think it matters. I won't
have a problem, though, if you will change it to whatever
you think is appropriate.

> > +=09=09=09/* Trim trailing spaces */
> > +=09=09=09do {
> > +=09=09=09=09line[x--] =3D '\0';
> > +=09=09=09} while (line[x] =3D=3D ' ' && x !=3D 0);
> =

> I'm not sure that's necessary (nor is the trimming of notionally
> unprintable characters).  The point was to get an accurate dump of the
> video buffer contents.

As I clearly stated in the manpage, `-P' option intended
only for getting quick'n'dirty human-readable dump. For
accurate dump with attributes, 8-bit clearness and so on
one should really use `-p' option.

> We've already had requests to automatically convert the 8 bit line
> drawing characters in to 7 bit ones (which shot2txt now does).  I'd
> prefer to see all the post-processing done outside of vidcontrol,
> otherwise you're on a slope in terms of what functionality is deemed
> acceptable for vidcontrol vs. what functionality has to be put in
> another utility.

In my view, in 90% of cases my -P option will cover the
users' needs. -p plus external utility will cover remaining
10%.

> Apart from those quibbles, great.  Thanks for doing the work.

Thank *you* for doing it. I've merely just rearranged
things a bit.

BTW, I think that the kernel's part of this feature has
to be extended to dump not only visible portion of the
screen buffer, but the whole history buffer as well. What
do you think?

-Maxim

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105191939.f4JJdjr00870>