]> git.wh0rd.org - dump.git/blobdiff - dump/optr.c
kill "register".
[dump.git] / dump / optr.c
index d1cdf1d711821d06572daae8b76b44afafe4ef61..a580f35843890f4a75e6a35158ec2af7a9142cd2 100644 (file)
@@ -2,8 +2,8 @@
  *     Ported to Linux's Second Extended File System as part of the
  *     dump and restore backup suit
  *     Remy Card <card@Linux.EU.Org>, 1994-1997
- *     Stelian Pop <pop@noos.fr>, 1999-2000
- *     Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
+ *     Stelian Pop <stelian@popies.net>, 1999-2000
+ *     Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: optr.c,v 1.25 2001/07/18 09:12:05 stelian Exp $";
+       "$Id: optr.c,v 1.30 2002/01/25 15:08:59 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -70,7 +70,6 @@ static const char rcsid[] =
 #include <ext2fs/ext2fs.h>
 #include <bsdcompat.h>
 #include <signal.h>
-#include <time.h>
 #endif
 
 #include "dump.h"
@@ -106,6 +105,12 @@ query(const char *question)
        FILE    *mytty;
        time_t  firstprompt, when_answered;
 
+       if (qflag) {
+               msg("%s - forced abort\n", question);
+               dumpabort(0);
+               /* NOTREACHED */
+       }
+
        firstprompt = time(NULL);
 
        if ((mytty = fopen(_PATH_TTY, "r")) == NULL)
@@ -280,7 +285,7 @@ static void
 sendmes(const char *tty, const char *message)
 {
        char t[MAXPATHLEN], buf[BUFSIZ];
-       register const char *cp;
+       const char *cp;
        int lmsg = 1;
        FILE *f_tty;
 
@@ -421,7 +426,7 @@ quit(fmt, va_alist)
 static struct fstab *
 allocfsent(struct fstab *fs)
 {
-       register struct fstab *new;
+       struct fstab *new;
 
        new = (struct fstab *)malloc(sizeof (*fs));
        if (new == NULL)
@@ -494,8 +499,8 @@ getfstab(void)
 struct fstab *
 fstabsearch(const char *key)
 {
-       register struct pfstab *pf;
-       register struct fstab *fs;
+       struct pfstab *pf;
+       struct fstab *fs;
        const char *rn;
 
        for (pf = table; pf != NULL; pf = pf->pf_next) {
@@ -522,9 +527,9 @@ fstabsearch(const char *key)
 struct fstab *
 fstabsearchdir(const char *key, char *directory)
 {
-       register struct pfstab *pf;
-       register struct fstab *fs;
-       register struct fstab *found_fs = NULL;
+       struct pfstab *pf;
+       struct fstab *fs;
+       struct fstab *found_fs = NULL;
        unsigned int size = 0;
        struct stat buf;
 
@@ -534,7 +539,7 @@ fstabsearchdir(const char *key, char *directory)
        for (pf = table; pf != NULL; pf = pf->pf_next) {
                fs = pf->pf_fstab;
                if (strlen(fs->fs_file) > size &&
-                   strlen(key) > strlen(fs->fs_file) + 1 &&
+                   strlen(key) > strlen(fs->fs_file) &&
                    strncmp(fs->fs_file, key, strlen(fs->fs_file)) == 0 &&
                    (key[strlen(fs->fs_file)] == '/' ||
                     fs->fs_file[strlen(fs->fs_file) - 1] == '/')) {