Re: [PATCH] kdb: utilize more readable control characters macro in kdb io

From: Nir Lichtman
Date: Thu Nov 28 2024 - 15:16:52 EST


On Wed, Nov 27, 2024 at 12:55:10PM -0800, Doug Anderson wrote:
> Hi,
>
> On Thu, Nov 21, 2024 at 12:45 PM Nir Lichtman <nir@xxxxxxxxxxxx> wrote:
> >
> > @@ -267,7 +267,7 @@ static char *kdb_read(char *buffer, size_t bufsize)
> > if (key != 9)
>
> FWIW, the "9" above is better as CTRL_KEY('I').

Right, missed that will fix.

>
>
> > @@ -176,14 +174,16 @@ int kdb_get_kbd_char(void)
> > case KT_LATIN:
> > switch (keychar) {
> > /* non-printable supported control characters */
> > - case CTRL('A'): /* Home */
> > - case CTRL('B'): /* Left */
> > - case CTRL('D'): /* Del */
> > - case CTRL('E'): /* End */
> > - case CTRL('F'): /* Right */
> > - case CTRL('I'): /* Tab */
> > - case CTRL('N'): /* Down */
> > - case CTRL('P'): /* Up */
> > + case CTRL_KEY('A'): /* Home */
> > + case CTRL_KEY('B'): /* Left */
> > + case CTRL_KEY('D'): /* Del */
> > + case CTRL_KEY('E'): /* End */
> > + case CTRL_KEY('F'): /* Right */
> > + case CTRL_KEY('I'): /* Tab */
> > + case CTRL_KEY('K'):
> > + case CTRL_KEY('N'): /* Down */
> > + case CTRL_KEY('P'): /* Up */
> > + case CTRL_KEY('U'):
>
> You snuck in a functionality change (adding Ctrl-K and Ctrl-U) here
> that should be in a separate patch.
>

Oops, those are left overs of something else I was trying to do, will remove.

> Otherwise this looks nice to me.

Thanks! Will send out a v2 with fixes shortly,
Nir