tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [RFC] userconf(4) modification



On Thu, Nov 02, 2023 at 06:59:50PM +0300, Valery Ushakov wrote:
> On Thu, Nov 02, 2023 at 16:29:42 +0100, tlaronde%kergis.com@localhost wrote:
> 
> > You will find attached the man page in order to be able to comment
> > about the proposed new syntax---supplementary syntax: it does not
> > replace the "legacy" one.
> 
> The man page is super-confusing.  Someone who needs to use userconf to
> get their system to boot needs a clear reference, but the proposed
> version tries to be overly formal and ends up a bit opaque.
> 
> I also don't understand why it is necessary to call the old syntax -
> "legacy".  From the man page my impression is that the command can be
> either
> 
>     command dev
> 
> or
> 
>     command property = value

I called it "legacy" because (I'm not an english native speaker) I
didn't find (or didn't know) how to call it differently.

In the present syntax (what I call "legacy"), you can give as a device
specification whether a number or a driver name.

If I want to introduce something else: a group name, I have to change
the syntax if I don't want to introduce something extra fancy to
stipulate it's a group name and not a driver name.

Hence the '=' that permits to clearly identify the "new" syntax
against the old one; specifying what property we are matching against
allow further extensions without syntax modifications if needed (not
proposed here).

> 
> both are in a sense a kind of device selector, why do you have to
> declare one of them "legacy"?  The user probably doesn't care much
> either way, they need to get the kernel booting and are not interested
> in the lore.
> 
> Why the thing after = is called "expression"?  That position only
> accepts two kinds of literals, one of which is a shorthand for the
> other (but I had to re-read that paragraph several times and I'm still
> not quite sure it actually clearly says that).

It's an expression because it depends. It can be a number (positive
integer) for devno; it can be a string literal (exact match) or a
pattern (substring match).

I retained the shorthand (literal string) because of the present
syntax. But it could be discarded in favor of the only /^drmkms$/
syntax i.e. a special case of pattern matching: matching against whole
string.

Since I'm not an english native speaker, I tend to put in text a
pseudo KNF. This is why it is "formal". It seems my attempt to be
"boring but clear" failed...

The current (not mine) man page is not formal. But it doesn't
tell the true story either. The STARred devices are not explained.
The devno is not explained either---and the range is not checked
in the code allowing access with a negative number in the cfdata
vector.

I will be grateful to some english native speaker or someone
confortable enough with english to fix the man page and/or propose a
syntax that will not require more acrobatics to "understand" that what
is wanted is neither a device by index (number), nor a device by
driver name but something else.

I like strong typing of variables... Awk(1), perl(1) and whatever
loose typing languages are not my cup of tea.
-- 
        Thierry Laronde <tlaronde +AT+ kergis +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index