Re: [PATCH] vt: make the default cursor shape configurable

From: Andrew Morton
Date: Tue Nov 10 2009 - 18:26:56 EST


On Tue, 10 Nov 2009 22:09:41 +0100
Pavel Machek <pavel@xxxxxx> wrote:

> On Mon 2009-11-09 23:09:44, Daniel Mack wrote:
> > On Tue, Nov 10, 2009 at 04:28:03AM +1030, David Newall wrote:
> > > Daniel Mack wrote:
> > > > And even if the cursor behaviour is changable at runtime, I don't see
> > > > why it shouldn't have a selectable compile time default. Which is what
> > > > the patch adds.
> > >
> > >
> > > It seems like adding cruft to the kernel that is just as effectively
> > > available at run-time. Where does it end? Do we eventually add bash to
> > > the kernel?
> >
> > One more thing:
> >
> > Clemens' last patch didn't add anything to the kernel's binary size.
> > It didn't slow down anything either, as there is no run-time condition
> > evaluation. It just makes something configurable which was hard
> > coded before. So where's the cruft?
>
> The number of configs to test just got bigger. 100% bigger in
> fact. Every single developer will have to answer 'do you want blinking
> cursor?' when your patch is merged.
>
> config options _are_ expensive.
>

Plus it's nice not to have to rebuild and reinstall the kernel to flip
a single bit...

The module_param() approach seems OK to me.


The initial patch was busted, IMO:

> @@ -1288,7 +1296,8 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
> int y;
> int c = scr_readw((u16 *) vc->vc_pos);
>
> - if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
> + if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1 ||
> + fbcon_disable_cursor)
> return;

this will disable the cursor forever, afacit. So if you boot with the
fbcon_disable_cursor option, you cannot later enable the cursor.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/