bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH] libdiskfs: merge of init-first.c and init-main.c


From: Neal H Walfield
Subject: Re: [PATCH] libdiskfs: merge of init-first.c and init-main.c
Date: Wed, 11 Apr 2001 17:31:14 +0200
User-agent: Mutt/1.3.15i

> > diskfs_init_main calls diskfs_init_diskfs itself.  Therefore, having
> > diskfs_init_diskfs as a public interface is useless especially with its
> > current comment.  Additionally, diskfs_init_main is the only caller of
> > diskfs_init_diskfs.
> 
> You are mistaken.  If you would like to make the diskfs.h comments more
> clear on the situation as it really is, then such changes would be welcome.

2001-04-08  Neal H Walfield  <neal@cs.uml.edu>

        * diskfs.h: Doc fixes.


--- hurd-20010329-snapshot/libdiskfs/diskfs.h   Mon Jan 29 20:12:51 2001
+++ hurd-20010401/libdiskfs/diskfs.h    Sun Apr  8 12:01:04 2001
@@ -1,5 +1,5 @@
 /* Definitions for fileserver helper functions
-   Copyright (C) 1994, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
+   Copyright (C) 1994,95,96,97,98,99,2001 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -26,6 +26,11 @@
 #include <hurd/iohelp.h>
 #include <idvec.h>
 
+/* The diskfs library provides functions to demultiplex the fs, io,
+   fsys, interrupt, and notify interfaces.  All the server routines
+   have the prefix `diskfs_S_'; `in' arguments of type file_t or io_t
+   appear as `struct protid *' to the stub.  */
+
 /* Each user port referring to a file points to one of these
    (with the aid of the ports library).  */
 struct protid
@@ -127,12 +132,14 @@
 /* Special flag for diskfs_lookup. */
 #define SPEC_DOTDOT 0x10000000
 
-struct argp;                   /* opaque in this file */
-struct argp_child;             /* opaque in this file */
-struct store;                  /* opaque in this file */
-struct store_parsed;           /* opaque in this file */
+struct argp;                   /* Opaque in this file.  */
+struct argp_child;             /* Opaque in this file.  */
+struct store;                  /* Opaque in this file.  */
+struct store_parsed;           /* Opaque in this file.  */
+struct pager;                  /* Opaque in this file.  */
+
 
-/* Declarations of variables the library sets.  */
+/* Declarations of variables which the library sets.  */
 
 extern mach_port_t diskfs_default_pager; /* send right */
 extern auth_t diskfs_auth_server_port; /* send right */
@@ -155,6 +162,7 @@
    screw anyone else should hold a writer lock.  */
 extern struct rwlock diskfs_fsys_lock;
 
+/* Mapped system time.  */
 extern volatile struct mapped_time_value *diskfs_mtime;
 
 /* True iff we should do every operation synchronously.  It
@@ -167,13 +175,11 @@
 
 extern int pager_port_type;
 
-/* Whether the filesystem is currently writable or not. */
+/* Whether the filesystem is currently writable or not.  */
 extern int diskfs_readonly;
 
 
-struct pager;
-
-/* Port classes we manage */
+/* Port classes we manage.  */
 extern struct port_class *diskfs_protid_class;
 extern struct port_class *diskfs_control_class;
 extern struct port_class *diskfs_execboot_class;
@@ -181,39 +187,39 @@
 extern struct port_class *diskfs_shutdown_notification_class;
 
 extern struct port_bucket *diskfs_port_bucket;
-
 
+/* Declarations of variables, functions and structures which the user
+   must or may define.  */
 
-/* Declarations of things the user must or may define.  */
-
-/* The user must define this type.  This should hold information
-   between calls to diskfs_lookup and diskfs_dir{enter,rewrite,rename}
-   so that those calls work as described below.  */
+/* The user must define this type.  Set this such that it can hold
+   any information needed between calls to diskfs_lookup and
+   diskfs_dir{enter,rewrite,rename} such that those calls work as
+   described below.  */
 struct dirstat;
 
-/* The user must define this variable; it should be the size in bytes
-   of a struct dirstat. */
+/* The user must define this variable.  Set this to be the size in bytes
+   of a struct dirstat.  */
 extern const size_t diskfs_dirstat_size;
 
-/* The user must define this variable; it is the maximum number of
-   links to any one file.  The implementation of dir_rename does not know
-   how to succeed if this is only one; on such formats you need to
-   reimplement dir_rename yourself.  */
+/* The user must define this variable.  Set this to the maximum number
+   of links to any one file.  The implementation of dir_rename does not
+   know how to succeed if this is only one; on such formats dir_rename
+   must be reimplemented.  */
 extern int diskfs_link_max;
 
-/* The user must define this variable; it is the maximum length of
-   a single pathname component (i.e. file name within directory).
+/* The user must define this variable.  Set this to the maximum length
+   of a single pathname component (i.e. file name within directory).
    The filesystem code does not use this for anything, but it is
    returned to user queries for _PC_NAME_MAX.  */
 extern int diskfs_name_max;
 
-/* The user must define this variable; it is the maximum number of
-   symlinks to be traversed within a single call to dir_pathtrans.
+/* The user must define this variable.  Set this to the maximum number
+   of symlinks to be traversed within a single call to dir_pathtrans.
    If this is exceeded, dir_pathtrans will return ELOOP.  */
 extern int diskfs_maxsymlinks;
 
-/* This variable is defined by diskfs; the user should set it if
-   the filesystem media cannot be made writeable. */
+/* This user may define this variable.  Set this if the filesystem
+   media cannot be made writable.  */
 extern int diskfs_hard_readonly;
 
 /* The user must define this variable.  Set this to be the node
@@ -221,7 +227,7 @@
 extern struct node *diskfs_root_node;
 
 /* The user must define this variable.  Set this to the name of the
-   filesystem server. */
+   filesystem server.  */
 extern char *diskfs_server_name;
 
 /* The user must define this variables.  Set this to be the server
@@ -229,37 +235,37 @@
 extern char *diskfs_server_version;
 
 /* The user may define this variable.  Set this to be any additional
-   version specification that should be printed for --version. */
+   version specification that should be printed for --version.  */
 extern char *diskfs_extra_version;
 
 /* The user may define this variable.  This should be nonzero iff the
-   filesystem format supports shortcutting symlink translation.
+   filesystem format supports short cutting symlink translation.
    The library guarantees that users will not be able to read or write
    the contents of the node directly, and the library will only do so
    if the symlink hook functions return EINVAL or are not defined.
    The library knows that the dn_stat.st_size field is the length of
-   the symlink, even if the hook functions are used. */
-int diskfs_shortcut_symlink;
+   the symlink, even if the hook functions are used.  */
+extern int diskfs_shortcut_symlink;
 
 /* The user may define this variable.  This should be nonzero iff the
-   filesystem format supports shortcutting chrdev translation.  */
-int diskfs_shortcut_chrdev;
+   filesystem format supports short cutting chrdev translation.  */
+extern int diskfs_shortcut_chrdev;
 
 /* The user may define this variable.  This should be nonzero iff the
-   filesystem format supports shortcutting blkdev translation.  */
-int diskfs_shortcut_blkdev;
+   filesystem format supports short cutting blkdev translation.  */
+extern int diskfs_shortcut_blkdev;
 
 /* The user may define this variable.  This should be nonzero iff the
-   filesystem format supports shortcutting fifo translation.  */
-int diskfs_shortcut_fifo;
+   filesystem format supports short cutting fifo translation.  */
+extern int diskfs_shortcut_fifo;
 
 /* The user may define this variable.  This should be nonzero iff the
-   filesystem format supports shortcutting ifsock translation. */
-int diskfs_shortcut_ifsock;
+   filesystem format supports short cutting ifsock translation.  */
+extern int diskfs_shortcut_ifsock;
 
 /* The user may define this variable, otherwise it has a default value of 30.
    diskfs_set_sync_interval is called with this value when the first diskfs
-   thread is started up (in diskfs_spawn_first_threa).   */
+   thread is started up (in diskfs_spawn_first_thread).   */
 extern int diskfs_default_sync_interval;
 
 /* The user must define this variable, which should be a string that somehow
@@ -298,7 +304,7 @@
    either the appropriate call listed above or diskfs_drop_dirstat will
    be called with DS before the directory DP is unlocked, and guarantees
    that no lookup calls will be made on this directory between this
-   lookup and the use (or descruction) of *DS.
+   lookup and the use (or destruction) of *DS.
 
    If you use the library's versions of diskfs_rename_dir,
    diskfs_clear_directory, and diskfs_init_dir, then lookups for `..'
@@ -324,7 +330,7 @@
    unsuccessful call to diskfs_lookup of type CREATE or RENAME; DP
    has been locked continuously since that call and DS is as that call
    set it, NP is locked.   CRED identifies the user responsible
-   for the call (to be used only to validate directory growth). */
+   for the call (to be used only to validate directory growth).  */
 error_t diskfs_direnter_hard (struct node *dp, const char *name,
                              struct node *np, struct dirstat *ds,
                              struct protid *cred);
@@ -344,7 +350,7 @@
 error_t diskfs_dirremove_hard (struct node *dp, struct dirstat *ds);
 
 /* The user must define this function.  Initialize DS such that
-   diskfs_drop_dirstat will ignore it. */
+   diskfs_drop_dirstat will ignore it.  */
 void diskfs_null_dirstat (struct dirstat *ds);
 
 /* The user must define this function.  DS has been set by a previous
@@ -362,7 +368,7 @@
    total size used.  Fill AMT with the number of entries copied.
    Regardless, never copy more than BUFSIZ bytes.  If BUFSIZ is 0,
    then there is no limit on *DATACNT; if N is -1, then there is no limit
-   on AMT. */
+   on AMT.  */
 error_t diskfs_get_directs (struct node *dp, int entry, int n,
                            char **data, u_int *datacnt,
                            vm_size_t bufsiz, int *amt);
@@ -413,7 +419,7 @@
 void diskfs_free_node (struct node *np, mode_t mode);
 
 /* Node NP has no more references; free local state, including *NP
-   if it isn't to be retained.  diskfs_node_refcnt_lock is held. */
+   if it isn't to be retained.  diskfs_node_refcnt_lock is held.  */
 void diskfs_node_norefs (struct node *np);
 
 /* The user must define this function.  Node NP has some light
@@ -423,14 +429,14 @@
    diskfs_lost_hardrefs.  */
 void diskfs_try_dropping_softrefs (struct node *np);
 
-/* The user must define this funcction.  Node NP has some light
-   references but has just lost its last hard reference.  NP is locked. */
+/* The user must define this function.  Node NP has some light
+   references but has just lost its last hard reference.  NP is locked.  */
 void diskfs_lost_hardrefs (struct node *np);
 
 /* The user must define this function.  Node NP has just acquired
    a hard reference where it had none previously.  It is thus now
    OK again to have light references without real users.  NP is
-   locked. */
+   locked.  */
 void diskfs_new_hardrefs (struct node *np);
 
 /* The user must define this function.  Return non-zero if locked
@@ -438,7 +444,7 @@
    diskfs_clear_directory and diskfs_init_directory, then `empty'
    means `possesses entries labelled . and .. only'.  CRED
    identifies the user making the call (if this user can't search
-   the directory, then this routine should fail). */
+   the directory, then this routine should fail).  */
 int diskfs_dirempty (struct node *dp, struct protid *cred);
 
 /* The user may define this function.  Return 0 if NP's mode can be
@@ -448,15 +454,15 @@
 error_t diskfs_validate_mode_change (struct node *np, mode_t mode);
 
 /* The user may define this function.  Return 0 if NP's owner can be
-   changed to UID; otherwise return an error code. */
+   changed to UID; otherwise return an error code.  */
 error_t diskfs_validate_owner_change (struct node *np, uid_t uid);
 
 /* The user may define this function.  Return 0 if NP's group can be
-   changed to GID; otherwise return an error code. */
+   changed to GID; otherwise return an error code.  */
 error_t diskfs_validate_group_change (struct node *np, gid_t gid);
 
 /* The user may define this function.  Return 0 if NP's author can be
-   changed to AUTHOR; otherwise return an error code. */
+   changed to AUTHOR; otherwise return an error code.  */
 error_t diskfs_validate_author_change (struct node *np, uid_t author);
 
 /* The user may define this function.  Return 0 if NP's flags can be
@@ -465,12 +471,12 @@
 error_t diskfs_validate_flags_change (struct node *np, int flags);
 
 /* The user may define this function.  Return 0 if NP's rdev can be
-   changed to RDEV; otherwise return an error code. */
+   changed to RDEV; otherwise return an error code.  */
 error_t diskfs_validate_rdev_change (struct node *np, dev_t rdev);
 
 /* The user must define this function.  Sync the info in NP->dn_stat
    and any associated format-specific information to disk.  If WAIT is true,
-   then return only after the physicial media has been completely updated. */
+   then return only after the physical media has been completely updated.  */
 void diskfs_write_disknode (struct node *np, int wait);
 
 /* The user must define this function.  Sync the file contents and all
@@ -482,16 +488,16 @@
 /* The user must define this function.  For each active node, call
    FUN.  The node is to be locked around the call to FUN.  If FUN
    returns non-zero for any node, then immediately stop, and return
-   that value. */
+   that value.  */
 error_t diskfs_node_iterate (error_t (*fun)(struct node *));
 
 /* The user must define this function.  Sync all the pagers and any
    data belonging on disk except for the hypermetadata.  If WAIT is true,
-   then return only after the physicial media has been completely updated. */
+   then return only after the physical media has been completely updated.  */
 void diskfs_sync_everything (int wait);
 
 /* Shutdown all pagers; this is done when the filesystem is exiting and is
-   irreversable.  */
+   irreversible.  */
 void diskfs_shutdown_pager ();
 
 /* The user must define this function.  Return a memory object port (send
@@ -505,7 +511,7 @@
 int diskfs_pager_users ();
 
 /* Return the bitwise or of the maximum prot parameter (the second arg to
-   diskfs_get_filemap) for all active user pagers. */
+   diskfs_get_filemap) for all active user pagers.  */
 vm_prot_t diskfs_max_user_pager_prot ();
 
 /* The user must define this function.  Return a `struct pager *' suitable
@@ -541,37 +547,58 @@
 /* If this function is nonzero (and diskfs_shortcut_symlink is set) it
    is called to read the contents of a symlink.  If it returns EINVAL or
    isn't set, then the normal method (reading from the file data) is
-   used.  If it returns any other error, it is returned to the user. */
+   used.  If it returns any other error, it is returned to the user.  */
 error_t (*diskfs_read_symlink_hook)(struct node *np, char *target);
 
-/* The library exports the following functions for general use */
+/* The library exports the following functions for general use.  */
+
+/* Initialization.  */
 
 /* Call this after arguments have been parsed to initialize the library.
-   You must call this before calling any other diskfs functions, and after
-   parsing diskfs options.  */
+   This must be called before any other diskfs functions.  */
 error_t diskfs_init_diskfs (void);
 
-/* Call this once the filesystem is fully initialized, to advertise the new
-   filesystem control port to our parent filesystem.  If BOOTSTRAP is set,
-   the diskfs will call fsys_startup on that port as appropriate and return
-   the REALNODE returned in that call; otherwise we return MACH_PORT_NULL.
-   FLAGS specifies how to open REALNODE (from the O_* set).  */
-mach_port_t diskfs_startup_diskfs (mach_port_t bootstrap, int flags);
-
 /* Call this after all format-specific initialization is done (except
-   for setting diskfs_root_node); at this point the pagers should be
+   possibly setting diskfs_root_node); at this point the pagers should be
    ready to go.  */
 void diskfs_spawn_first_thread (void);
 
-/* Once diskfs_root_node is set, call this if we are a bootstrap
-   filesystem.  If you call this, then the library will call
-   diskfs_init_completed once it has a valid proc and auth port. */
-void diskfs_start_bootstrap ();
+/* Call this once the filesystem is fully initialized (e.g. after having
+   called diskfs_init_diskfs, diskfs_spawn_first_thread and initializing
+   diskfs_root_node), to advertise the filesystem control port to the
+   parent filesystem.  If BOOTSTRAP is set, fsys_startup will be called
+   passing it the port and FLAGS, as from the O_* set, indicating how the
+   underlying node should be opened.  The port that it returns will, in
+   turn, be passed back to the callee.  Should BOOTSTRAP not be set, it 
+   is assumed that this is the bootstrap filesystem and special
+   initialization is performed.  In this case, as there is by definition
+   no underlying node, MACH_PORT_NULL is returned.  */
+mach_port_t diskfs_startup_diskfs (mach_port_t bootstrap, int flags);
 
-/* Node NP now has no more references; clean all state.  The
-   _diskfs_node_refcnt_lock must be held, and will be released
-   upon return.  NP must be locked.  */
-void diskfs_drop_node (struct node *np);
+/* All-in-one initialization function for diskfs filesystems using
+   libstore.  This parses the arguments, ARGC and ARGV, using
+   STARTUP_ARGP or, if that is NULL, diskfs_store_startup_argp.  Either
+   way, the ARGP_IN_ORDER flag is passed to the argp subsystem.  It then
+   opens the store using store_parsed_open, sets diskfs_hard_readonly
+   and diskfs_readonly if appropriate, gets the bootstrap port and calls
+   diskfs_init_diskfs and diskfs_spawn_first_thread.  The parsed store
+   is returned in *STORE_PARSED, the bootstrap port in *BOOTSTRAP and the
+   store itself directly.  The caller should pass *BOOTSTRAP to
+   diskfs_startup_diskfs after setting diskfs_root_node.  Cf <argp.h> and
+   <hurd/store.h>.
+
+   This call does not return failure; if it encounters a problem, it
+   prints a diagnostic on stderr (or the console) and aborts.  */
+struct store *diskfs_init_main (struct argp *startup_argp,
+                               int argc, char **argv,
+                               struct store_parsed **store_parsed,
+                               mach_port_t *bootstrap);
+
+/* Node management.  */
+
+/* Create a new node structure with DS as its physical disknode.
+   The new node will have one hard reference and no light references.  */
+struct node *diskfs_make_node (struct disknode *dn);
 
 /* Set on disk fields from NP->dn_stat; update ctime, atime, and mtime
    if necessary.  If WAIT is true, then return only after the physical
@@ -580,7 +607,7 @@
 
 /* Add a hard reference to a node.  If there were no hard
    references previously, then the node cannot be locked
-   (because you must hold a hard reference to hold the lock). */
+   (because you must hold a hard reference to hold the lock).  */
 void diskfs_nref (struct node *np);
 
 /* Unlock node NP and release a hard reference; if this is the last
@@ -595,10 +622,10 @@
    to be dropped.  */
 void diskfs_nrele (struct node *np);
 
-/* Add a light reference to a node. */
+/* Add a light reference to a node.  */
 void diskfs_nref_light (struct node *np);
 
-/* Unlock node NP and release a light reference */
+/* Unlock node NP and release a light reference.  */
 void diskfs_nput_light (struct node *np);
 
 /* Release a light reference on NP.  If NP is locked by anyone, then
@@ -606,10 +633,10 @@
    hard reference in order to hold the lock).  */
 void diskfs_nrele_light (struct node *np);
 
-/* Reading and writing of files. this is called by other filesystem
+/* Reading and writing of files.  This is called by other filesystem
    routines and handles extension of files automatically.  NP is the
    node to be read or written, and must be locked.  DATA will be
-   written or filled.  OFF identifies where in thi fel the I/O is to
+   written or filled.  OFF identifies where in the file the I/O is to
    take place (-1 is not allowed).  AMT is the size of DATA and tells
    how much to copy.  DIR is 1 for writing and 0 for reading.  CRED is
    the user doing the access (only used to validate attempted file
@@ -619,7 +646,8 @@
 diskfs_node_rdwr (struct node *np, char *data, off_t off,
                  size_t amt, int dir, struct protid *cred,
                  size_t *amtread);
-
+
+/* User notifications.  */
 
 /* Send notifications to users who have requested them with
    dir_notice_changes for directory DP.  The type of modification and
@@ -638,14 +666,15 @@
 void
 diskfs_notice_filechange (struct node *np, enum file_changed_type type,
                          off_t start, off_t end);
-
-/* Create a new node structure with DS as its physical disknode.
-   The new node will have one hard reference and no light references.  */
-struct node *diskfs_make_node (struct disknode *dn);
-
 
-/* The library also exports the following functions; they are not generally
-   useful unless you are redefining other functions the library provides. */
+/* The library also exports the following functions; they are not
+   generally useful unless you are redefining other functions that the
+   library provides.  */
+
+/* Node NP now has no more references; clean all state.  The
+   _diskfs_node_refcnt_lock must be held, and will be released upon
+   return.  NP must be locked.  */
+void diskfs_drop_node (struct node *np);
 
 /* Lookup in directory DP (which is locked) the name NAME.  TYPE will
    either be LOOKUP, CREATE, RENAME, or REMOVE.  CRED identifies the
@@ -675,7 +704,7 @@
    either the appropriate call listed above or diskfs_drop_dirstat will
    be called with DS before the directory DP is unlocked, and guarantees
    that no lookup calls will be made on this directory between this
-   lookup and the use (or descruction) of *DS.
+   lookup and the use (or destruction) of *DS.
 
    If you use the library's versions of diskfs_rename_dir,
    diskfs_clear_directory, and diskfs_init_dir, then lookups for `..'
@@ -734,7 +763,7 @@
 error_t diskfs_dirremove (struct node *dp, struct node *np,
                          const char *name, struct dirstat *ds);
 
-/* Return the node corresponding to CACHE_ID in *NPP. */
+/* Return the node corresponding to CACHE_ID in *NPP.  */
 error_t diskfs_cached_lookup (int cache_id, struct node **npp);
 
 /* Create a new node. Give it MODE; if that includes IFDIR, also
@@ -750,7 +779,7 @@
                    struct dirstat *ds);
 
 /* Create and return a protid for an existing peropen PO in CRED,
-   referring to user USER.  The node PO->np must be locked. */
+   referring to user USER.  The node PO->np must be locked.  */
 error_t diskfs_create_protid (struct peropen *po, struct iouser *user,
                              struct protid **cred);
 
@@ -765,32 +794,32 @@
 /* Create and return a new peropen structure on node NP with open
    flags FLAGS.  The initial values for the root_parent, shadow_root, and
    shadow_root_parent fields are copied from CONTEXT if it's non-zero,
-   otherwise zerod.  */
+   otherwise zeroed.  */
 struct peropen *diskfs_make_peropen (struct node *np, int flags,
                                     struct peropen *context);
 
-/* Called when a protid CRED has no more references.  (Because references\
-   to protids are maintained by the port management library, this is
-   installed in the clean routines list.)  The ports library will
-   free the structure for us.  */
+/* Called when a protid CRED has no more references.  Because
+   references to protids are maintained by the port management library,
+   this is installed in the clean routines list, thus, the ports library
+   will free this structure for us.  */
 void diskfs_protid_rele (void *arg);
 
-/* Decrement the reference count on a peropen structure. */
+/* Decrement the reference count on a peropen structure.  */
 void diskfs_release_peropen (struct peropen *po);
 
 /* Node NP has just been found in DIR with NAME.  If NP is null, that
-   means that this name has been confirmed as absent in the directory. */
+   means that this name has been confirmed as absent in the directory.  */
 void diskfs_enter_lookup_cache (struct node *dir, struct node *np,
                                const char *name);
 
 /* Purge all references in the cache to NP as a node inside
-   directory DP. */
+   directory DP.  */
 void diskfs_purge_lookup_cache (struct node *dp, struct node *np);
 
 /* Scan the cache looking for NAME inside DIR.  If we don't know
    anything entry at all, then return 0.  If the entry is confirmed to
    not exist, then return -1.  Otherwise, return NP for the entry, with
-   a newly allocated reference. */
+   a newly allocated reference.  */
 struct node *diskfs_check_lookup_cache (struct node *dir, const char *name);
 
 /* Rename directory node FNP (whose parent is FDP, and which has name
@@ -813,7 +842,7 @@
    directories must be locked.  This routine assumes the usual
    convention where `.' and `..' are represented by ordinary links; if
    that is not true for your format, you have to redefine this
-   function. */
+   function.  */
 error_t diskfs_clear_directory (struct node *dp, struct node *pdp,
                                struct protid *cred);
 
@@ -823,15 +852,15 @@
    must be clear within the meaning of diskfs_dirempty.  This routine
    assumes the usual convention where `.' and `..' are represented by
    ordinary links; if that is not true for your format, you have to
-   redefine this function.   CRED identifies the user making the call. */
+   redefine this function.   CRED identifies the user making the call.  */
 error_t
 diskfs_init_dir (struct node *dp, struct node *pdp, struct protid *cred);
 
 /* If NP->dn_set_ctime is set, then modify NP->dn_stat.st_ctime
-   appropriately; do the analogous operation for atime and mtime as well. */
+   appropriately; do the analogous operation for atime and mtime as well.  */
 void diskfs_set_node_times (struct node *np);
 
-/* Shutdown the filesystem; flags are as for fsys_goaway. */
+/* Shutdown the filesystem; flags are as for fsys_goaway.  */
 error_t diskfs_shutdown (int flags);
 
 /* Change an active filesystem between read-only and writable modes, setting
@@ -900,38 +929,12 @@
 int diskfs_demuxer (mach_msg_header_t *, mach_msg_header_t *);
 
 /* Check if the filesystem is readonly before an operation that
-   writes it.  Return 1 if readonly, zero otherwise. */
+   writes it.  Return 1 if readonly, zero otherwise.  */
 int diskfs_check_readonly (void);
-
-/* The diskfs library provides functions to demultiplex the fs, io,
-   fsys, interrupt, and notify interfaces.  All the server routines
-   have the prefix `diskfs_S_'; `in' arguments of type file_t or io_t
-   appear as `struct protid *' to the stub.  */
-
-
-/* All-in-one initialization function for diskfs filesystems using
-   libstore.  This parses arguments using STARTUP_ARGP (defaulting to
-   diskfs_store_startup_argp if it's null; note that the ARGP_IN_ORDER
-   flag is always used); it calls diskfs_init_diskfs; it opens the
-   store with store_parsed_open, and sets diskfs_hard_readonly and
-   diskfs_readonly if the store is unwritable; it calls
-   diskfs_spawn_first_thread; finally, it returns the store and its
-   description in *STORE and *STORE_PARSED, and the bootstrap port in
-   *BOOTSTRAP.  The caller should pass *BOOTSTRAP to
-   diskfs_startup_diskfs after setting diskfs_root_node.
-   (See <argp.h> and <hurd/store.h>.)
-
-   This call cannot return failure; if it encounters a fatal problem,
-   it prints a diagnostic on stderr (or the console) and exits the
-   program.  */
-struct store *diskfs_init_main (struct argp *startup_argp,
-                               int argc, char **argv,
-                               struct store_parsed **store_parsed,
-                               mach_port_t *bootstrap);
 
-/* The following are optional convenience routines and global variable, which
-   can be used by any user program that uses a mach device to hold the
-   underlying filesystem.  */
+/* The following are optional convenience routines and global variable,
+   which can be used by any user program that uses a mach device to hold
+   the underlying filesystem.  */
 
 /* Make errors go somewhere reasonable.  */
 void diskfs_console_stdio ();

Attachment: pgpLUj7YnsEVe.pgp
Description: PGP signature


reply via email to

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