bug-hurd
[Top][All Lists]
Advanced

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

netfs questions


From: Farid Hajji
Subject: netfs questions
Date: Thu, 7 Dec 2000 17:37:56 +0100

Hi,

I have two questions about using netfs:

1. what is supposed to go in the 'struct netnode' of
   the 'struct node' defined in <hurd/netfs.h>?

   If I understand this right, struct netnode must be
   defined by the user and is supposed to hold protocol
   specific stuff of each node. Would a simple

      struct netnode { };

   suffice? (it compiles okay, but is it right?)

2. what is supposed to be put in a root node, suitable
   for netfs_root_node?

   Asked more specifically, how can an empty directory
   containing only '.' and '..' be inserted in a netfs_root_node?
   This is what I'm having right now:

   /* in main(): */
   netfs_root_node = make_rootnode();

   /* whereever: */
   struct node *make_rootnode(void) {
     struct node *np;
     struct netnode *nn;

     nn = malloc(sizeof (struct netnode));
     bzero(nn, sizeof (struct netnode));     /* XXX */

     np = netfs_make_node(nn);

     /* create an empty directory in np */
     /* np->nn_stat = { ?????? } */
   }

Thanks,

-Farid.

-- 
Farid Hajji -- Unix Systems and Network Admin | Phone: +49-2131-67-555
Broicherdorfstr. 83, D-41564 Kaarst, Germany  | farid.hajji@ob.kamp.net
- - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - -
Murphy's Law fails only when you try to demonstrate it, and thus succeeds.




reply via email to

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