[Top][All Lists]

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

[RFC] Long environment variables.

From: Vladimir 'phcoder' Serbinenko
Subject: [RFC] Long environment variables.
Date: Sun, 30 Aug 2009 14:21:22 +0200

Currently we don't have a reliable autodetector to pass hardware info
to xnu kernel.
I wanted to let user specify it through environment variables - it
allows user to e.g. correct wrong entry in dump at boot time. E.g:
But the problem is that in some dumps I recieved from users one of
variables is 64K binary.
As all values in hardware info are binaries they are all hexified.
So it makes 128K environment variable. One problem is that 'set'
floods the terminal and another problem is that source <dump> takes
noticeable time.
Solutions to consider (ideas collected over freenode):
1) make set truncate variables on output unless user passes "set -a"
or perhaps instead of displaying variable say
'%s' is %d bytes long.
unless user specifies 'set -a'
Additionally make a command loadenvfile for fast loading of environment lists.
2) Not use environment variables for this at all. Load binary dumps.
Eventually have dedicated commands to modify device-properties. This
perhaps makes faster booting too. (no hexification/dehexification).
This allows to load dumps from dumping tool without preparsing done by
userspace tool (not a real issue, dumper is userspace too).
3) Use environment variables for only part of device-properties. It's
both ad-hoc and hard to get right. I would avoid this solution.
What do you think?
Vladimir 'phcoder' Serbinenko

Personal git repository:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]