MOUNT types become names
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Fri, 5 May 1995 07:24:19 +0000 (23:24 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Fri, 5 May 1995 07:24:19 +0000 (23:24 -0800)
SCCS-vsn: libexec/lfs_cleanerd/clean.h 8.2
SCCS-vsn: libexec/lfs_cleanerd/library.c 8.2
SCCS-vsn: libexec/lfs_cleanerd/cleanerd.c 8.3

usr/src/libexec/lfs_cleanerd/clean.h
usr/src/libexec/lfs_cleanerd/cleanerd.c
usr/src/libexec/lfs_cleanerd/library.c

index 66b43f9..4b66c53 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)clean.h     8.1 (Berkeley) %G%
+ *     @(#)clean.h     8.2 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -80,7 +80,7 @@ typedef struct fs_info {
 __BEGIN_DECLS
 int     dump_summary __P((struct lfs *, SEGSUM *, u_long, daddr_t **));
 void    err __P((const int, const char *, ...));
 __BEGIN_DECLS
 int     dump_summary __P((struct lfs *, SEGSUM *, u_long, daddr_t **));
 void    err __P((const int, const char *, ...));
-int     fs_getmntinfo __P((struct statfs **, char *, int));
+int     fs_getmntinfo __P((struct statfs **, char *, char *));
 int     get __P((int, off_t, void *, size_t));
 FS_INFO        *get_fs_info __P((struct statfs *, int));
 int     lfs_segmapv __P((FS_INFO *, int, caddr_t, BLOCK_INFO **, int *));
 int     get __P((int, off_t, void *, size_t));
 FS_INFO        *get_fs_info __P((struct statfs *, int));
 int     lfs_segmapv __P((FS_INFO *, int, caddr_t, BLOCK_INFO **, int *));
index 10f6063..4629e8b 100644 (file)
@@ -12,7 +12,7 @@ static char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)cleanerd.c 8.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)cleanerd.c 8.3 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -157,7 +157,7 @@ main(argc, argv)
        signal(SIGINT, sig_report);
        signal(SIGUSR1, sig_report);
        signal(SIGUSR2, sig_report);
        signal(SIGINT, sig_report);
        signal(SIGUSR1, sig_report);
        signal(SIGUSR2, sig_report);
-       if (fs_getmntinfo(&lstatfsp, fs_name, MOUNT_LFS) == 0) {
+       if (fs_getmntinfo(&lstatfsp, fs_name, "lfs") == 0) {
                /* didn't find the filesystem */
                err(1, "lfs_cleanerd: filesystem %s isn't an LFS!", fs_name);
        }
                /* didn't find the filesystem */
                err(1, "lfs_cleanerd: filesystem %s isn't an LFS!", fs_name);
        }
index 4c72994..7cdc59c 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)library.c  8.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)library.c  8.2 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -47,7 +47,7 @@ int
 fs_getmntinfo(buf, name, type)
        struct  statfs  **buf;
        char    *name;
 fs_getmntinfo(buf, name, type)
        struct  statfs  **buf;
        char    *name;
-       int     type;
+       char    *type;
 {
        /* allocate space for the filesystem info */
        *buf = (struct statfs *)malloc(sizeof(struct statfs));
 {
        /* allocate space for the filesystem info */
        *buf = (struct statfs *)malloc(sizeof(struct statfs));
@@ -61,7 +61,7 @@ fs_getmntinfo(buf, name, type)
        }
 
        /* check to see if it's the one we want */
        }
 
        /* check to see if it's the one we want */
-       if (((*buf)->f_type != type) ||
+       if (strcmp((*buf)->f_fstypename, type) ||
            strncmp(name, (*buf)->f_mntonname, MNAMELEN)) {
                /* "this is not the filesystem you're looking for */
                free(*buf);
            strncmp(name, (*buf)->f_mntonname, MNAMELEN)) {
                /* "this is not the filesystem you're looking for */
                free(*buf);