[prev in list] [next in list] [prev in thread] [next in thread] 

List:       amanda-hackers
Subject:    Re: Disk Detection with amrecover ?
From:       Richard Kail <e8903122 () student ! tuwien ! ac ! at>
Date:       1998-01-27 15:43:40
[Download RAW message or body]

Hello !

On Tue, 27 Jan 1998, Richard Kail wrote:

> 	Sorry, but doesn't work. I looked at it. I got finally 

> 	Maybe there is a problem in int build_disk_table P((void)) resp.
> the parser part (from for(; (line = agets(fp)) != NULL; free(line)) ) and
> its error checking. There is no "No dump to list" checking ..... If this
> fails, the server is in unhappy state and the client goes to the next try
> which is sdb1 (in my case) and should work.

	What do you think about like this (Your patch is enclosed...):

diff -C 3 -r amanda-2.4.0b6/server-src/amindexd.c
/kailserver/usr/src/amanda-2.4.0b6/server-src/amindexd.c
*** amanda-2.4.0b6/server-src/amindexd.c        Wed Jan 21 06:36:53 1998
--- /kailserver/usr/src/amanda-2.4.0b6/server-src/amindexd.c    Tue Jan 27
16:37:56 1998
***************
*** 448,454 ****
                    " ", config,
                    " ", "find",
                    " ", dump_hostname,
!                   " ", disk_name,
                    NULL);
      if ((fp = popen(cmd, "r")) == NULL)
      {
--- 448,454 ----
                    " ", config,
                    " ", "find",
                    " ", dump_hostname,
!                   " \'^", disk_name, "$\'",
                    NULL);
      if ((fp = popen(cmd, "r")) == NULL)
      {
***************
*** 462,467 ****
--- 462,477 ----
        if (first_line++ == 0) {
            continue;
        }
+
+       {
+         char *tmpl="No dump to list";
+
+         if ( 0 == strncmp(tmpl, line, strlen(tmpl))) {
+           reply(598, "Error: disk not found.");
+           apclose(fp);
+           return -1;
+         }
+    }

        s = line;
        ch = *s++;

mit freundlichen Gruessen,
	Richard Kail

------
Richard Kail        e8903122@student.tuwien.ac.at

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic