[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: showtrans --active
Re: showtrans --active
Sun, 18 Aug 2002 04:57:34 +0200
On Sun, Aug 11, 2002 at 09:41:53AM -0400, David Walter,,, wrote:
> > It appears you have recreated the functioning of the fsysopts program.
> > I suggest you just use that (e.g. "fsysopts /foo").
> I didn't think that fsysopts did the same thing.
first, please submit patches following the GNU coding standards. Read the
GNU coding standards and have a look at the Hurd sources for the details.
It makes the code so much easier to read for us.
But before actually writing code, you should think about the situation a
bit. I think your code doesn't do what you want it to do. There are two
types of translators in the Hurd, passive and active translators. The only
relation between the two is that passive translators can be used to start
active translators automatically. Once the active translator runs on a
node, the passive translator is ignored (until of course the active
translator is removed again).
Passive translators are a feature of the filesystem. You can query and set
them with file_get_translator etc. Also, the filesystem can tell you if a
file is translated (actively or passively). However, it doesn't know the
options of the running active translator. You can even have an active
translator running manually on a passively translated node which has nothing
to do with the passive translator setting:
ajax:/tmp# settrans -ac foo /hurd/hello
ajax:/tmp# settrans -pk foo /hurd/null
ajax:/tmp# cat foo
ajax:/tmp# showtrans foo
ajax:/tmp# fsysopts foo
/hurd/hello --contents=Hello, world!
Please study this case carefully, and test your showtrans modification on it.
Does your code do what you expect it to do?
There are several errors in your code (like, s_rc is not used?!, some
operations are redundant). But more importantly, it is not consistent with
the design of the translator concept.
showtrans reports passive translators.
fsysopts reports active translators (if they support it).
What you seem to be looking for is a tool that tells you if a node is
actively translated without starting an active translator if it is not
actively translated but has a passive translator setting. I would agree
that this is a useful and consistent feature. I think it should be in
several places, in ls (Alfred had an implementation for this), but maybe
also in fsysopts.
>From an end user perspective, I think it makes sense to add a new option to
showtrans, -a, --active, which reports the active translator just as
fsysopts does. Then the -t option in conjunction with -a would make it
check first if there is an active translator running on that node as its
root node, and you could use showtrans -at to get the desired effect.
This will not give you /, as that node is special in that it is usually not
"translated". But if it is translated (eg, shadowfs or fakeroot), you could
see that setting.
showtrans should never report something on untranslated nodes, unlike
fsysopts, which is just used to communicate with the filesystem, and doesn't
care if it has the root node of it or not.
`Rhubarb is no Egyptian god.' GNU http://www.gnu.org firstname.lastname@example.org
Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/
- showtrans --active, David Walter, 2002/08/10
- Re: showtrans --active, Roland McGrath, 2002/08/11
- Re: showtrans --active, Niels Möller, 2002/08/11
- Re: showtrans --active, David Walter,,,, 2002/08/11
- Re: showtrans --active,
Marcus Brinkmann <=
- Re: showtrans --active, David Walter, 2002/08/18
- Re: showtrans --active, Niels Möller, 2002/08/20