Hang on guys,

I'm getting directions from a number of people here.  Woe Nelly!

The patch described below and the previous simple patch have not yet been 
applied to any of my systems.

I have only done a basic make of getfsent and sent the un modified (or P2 
distribution) results of getfsent to you.  This is what you asked for 
first.

If I'm not mistaken your next instruction was to install the simple patch 
but then retracted that idea as it may not work on Linux.  Right?

So the only patch I should apply is the one listed here in this specific e-
mail. Right?

And I should do this on all systems. Right?

I will try just this patch and give you some results shortly!  The 
unmodified getfsent results you have already. By the way those results 
were from the server.

You should have the next results within the next few hours.  (I'm 
currently not at that customer site now).

Will keep you posted!

Walter


> On Mon, Apr 09, 2001 at 02:03:00PM -0300, Alexandre Oliva wrote:
> > Looks like we need an additional argument in search_fstab, say
> > check_dev, and get amname_to_devname to call search_fstab first with
> > check_dev == 1, so as to reject any entries whose device names don't
> > exist, then, if none are found (as it would be the case in Tru64),
> > retry iwth check_dev == 0.
> 
> Could you try this patch on Tru64.
> 
> Jean-Louis
> -- 
> Jean-Louis Martineau             email: [EMAIL PROTECTED] 
> Departement IRO, Universite de Montreal
> C.P. 6128, Succ. CENTRE-VILLE    Tel: (514) 343-6111 ext. 3529
> Montreal, Canada, H3C 3J7        Fax: (514) 343-5834
> --- client-src/getfsent.h.orig        Mon Apr  9 19:26:48 2001
> +++ client-src/getfsent.h     Mon Apr  9 19:20:46 2001
> @@ -54,7 +54,7 @@
>  void close_fstab P((void));
>  
>  int get_fstab_nextentry P((generic_fsent_t *fsent));
> -int search_fstab P((char *name, generic_fsent_t *fsent));
> +int search_fstab P((char *name, generic_fsent_t *fsent, int check_dev));
>  int is_local_fstype P((generic_fsent_t *fsent));
>  
>  char *amname_to_devname P((char *str));
> --- client-src/getfsent.c.orig        Mon Apr  9 19:26:42 2001
> +++ client-src/getfsent.c     Mon Apr  9 19:26:07 2001
> @@ -427,9 +427,10 @@
>    return 0;
>  }
>  
> -int search_fstab(name, fsent)
> +int search_fstab(name, fsent, check_dev)
>       char *name;
>       generic_fsent_t *fsent;
> +     int check_dev;
>  {
>    struct stat stats[3];
>    char *fullname = NULL;
> @@ -476,8 +477,8 @@
>      if(fsent->fsname != NULL) {
>        sfs = stat(fsent->fsname, &fsstat);
>        sfsr = stat((rdev = dev2rdev(fsent->fsname)), &fsrstat);
> -      /* We don't want to `continue;' even if both sfs and sfsr are
> -      -1, because, if we get here, at least smnt is not -1.  */
> +      if(check_dev == 1 && sfs == -1 && sfsr == -1)
> +     continue;
>      }
>  
>      if((fsent->mntdir != NULL &&
> @@ -520,8 +521,9 @@
>  {
>      generic_fsent_t fsent;
>  
> -    if(search_fstab(str, &fsent))
> -      if (fsent.fsname != NULL)
> +    if(search_fstab(str, &fsent, 1) && fsent.fsname != NULL)
> +     str = fsent.fsname;
> +    else if(search_fstab(str, &fsent, 0) && fsent.fsname != NULL)
>       str = fsent.fsname;
>  
>      return dev2rdev(str);
> @@ -532,8 +534,9 @@
>  {
>      generic_fsent_t fsent;
>  
> -    if(search_fstab(str, &fsent))
> -      if (fsent.mntdir != NULL)
> +    if(search_fstab(str, &fsent, 1) && fsent.mntdir != NULL)
> +     str = fsent.mntdir;
> +    else if(search_fstab(str, &fsent, 0) && fsent.mntdir != NULL)
>       str = fsent.mntdir;
>  
>      return stralloc(str);
> @@ -544,7 +547,7 @@
>  {
>      generic_fsent_t fsent;
>  
> -    if (!search_fstab(str, &fsent))
> +    if (!search_fstab(str, &fsent, 1) && !search_fstab(str, &fsent, 0))
>        return stralloc("");
>  
>      return stralloc(fsent.fstype);
> @@ -603,7 +606,7 @@
>      close_fstab();
>  
>      name = newstralloc(name, "/usr");
> -    if(search_fstab(name, &fsent)) {
> +    if(search_fstab(name, &fsent, 1) || search_fstab(name, &fsent, 0)) {
>       printf("Found %s mount for %s:\n",
>              is_local_fstype(&fsent)? "local" : "remote", name);
>       print_entry(&fsent);
> @@ -612,7 +615,7 @@
>       printf("Mount for %s not found\n", name);
>  
>      name = newstralloc(name, "/");
> -    if(search_fstab(name, &fsent)) {
> +    if(search_fstab(name, &fsent, 1) || search_fstab(name, &fsent, 0)) {
>       printf("Found %s mount for %s:\n",
>              is_local_fstype(&fsent)? "local" : "remote", name);
>       print_entry(&fsent);

Reply via email to