[Top][All Lists]

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

path+file_name from port or process info?

From: David Walter,,,
Subject: path+file_name from port or process info?
Date: Mon, 22 Jul 2002 15:04:58 -0400

Hi.  Is there a way to return the path name from a port?

I'm trying to implement an mtab translator.

The following functionality is implemented (more or less).

0. A  linked list of struct  mntent containing currently reported file

1. query    of  items   from   the translator     that is:   df  works
(trivfs_S_io_read) returns items from the system.

2. write is disabled, i.e. return EOPNOTSUPP.

3.  insertion of a new entry  by using a  utility program mtab_client.
currently  uses getline to  read in a  mount record.  A mig definition
file has been generated to create an insert of a record, the arguments
are a  string and the  strings length. The record  is  parsed from the
string using sscanf.

I am  thinking that a natural  way to handle  the call to insert a new
file system would  be for  the translator  /hurd/{*fs} to  make a call
with just  their mount  point. mtab  could then find  all  information
about that filesystem by asking the translator.

This seems like it would  have two benefits,  by installing a hook for
watching  the translator, (1)if/when it  dies the entry can be removed
from mtab, (2) end  users don't have to  know about additional options
to filesystem translators which cause updates to mtab.

This way the translator can be self maintaining.


I can't   find  a way to  determine   the mount  point  reliably in  a
translator, as  it's cwd isn't necessarily  the same at startup as the
node for which it translates.

Is there a way to determine the path that settrans would have used for
a translator  from its process  information?

As a  temporary kludge I have added  a settrans call in /libexec/rc. I
notice that this deletes all files in  /var/run on startup.  Thus this
translator doesn't exist across reboots.  Will a production GNU system
        settrans -cap /var/run/mtab /hurd/mtab 

at each system startup?

I haven't figured out notification  yet, if anyone has tips, pointers,
example code I will be happy to have them.

Oh, I don't know if help-hurd or bug-hurd  is the right forum for this
question, assuming that the missing  functionality of mtab is  wanted,
it  seems like a  missing feature not a bug,  but feel free to correct
the responses.  I read both lists.


Hope springs eternal!

/ \

reply via email to

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