X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=client-src%2Famandates.c;h=e19d1d5bc973f94a67826cda8515ed682f7de664;hb=691567b16c13087b31ee4c2b6d038e57872fae82;hp=b800520b873766b9b6747a1aaa7f4fa7300e9797;hpb=12179dea039515c06168c0037d048566a3f623de;p=debian%2Famanda diff --git a/client-src/amandates.c b/client-src/amandates.c index b800520..e19d1d5 100644 --- a/client-src/amandates.c +++ b/client-src/amandates.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -26,7 +27,7 @@ /* * $Id: amandates.c,v 1.21 2006/07/25 18:35:21 martinea Exp $ * - * manage amandates file, that mimics /etc/dumpdates, but stores + * manage amandates file, that mimics /var/lib/dumpdates, but stores * GNUTAR dates */ @@ -57,8 +58,10 @@ start_amandates( int ch; char *qname; - if (amandates_file == NULL) + if (amandates_file == NULL) { + errno = 0; return 0; + } /* clean up from previous invocation */ @@ -102,7 +105,7 @@ start_amandates( rc = amroflock(fileno(amdf), amandates_file); if(rc == -1) { - error("could not lock %s: %s", amandates_file, strerror(errno)); + error(_("could not lock %s: %s"), amandates_file, strerror(errno)); /*NOTREACHED*/ } @@ -137,7 +140,7 @@ start_amandates( } if(ferror(amdf)) { - error("reading %s: %s", amandates_file, strerror(errno)); + error(_("reading %s: %s"), amandates_file, strerror(errno)); /*NOTREACHED*/ } @@ -157,7 +160,7 @@ finish_amandates(void) if(updated) { if(readonly) { - error("updated amandates after opening readonly"); + error(_("updated amandates after opening readonly")); /*NOTREACHED*/ } @@ -166,7 +169,7 @@ finish_amandates(void) for(level = 0; level < DUMP_LEVELS; level++) { if(amdp->dates[level] == EPOCH) continue; qname = quote_string(amdp->name); - fprintf(amdf, "%s %d %ld\n", + g_fprintf(amdf, "%s %d %ld\n", qname, level, (long) amdp->dates[level]); amfree(qname); } @@ -174,11 +177,11 @@ finish_amandates(void) } if(amfunlock(fileno(amdf), g_amandates_file) == -1) { - error("could not unlock %s: %s", g_amandates_file, strerror(errno)); + error(_("could not unlock %s: %s"), g_amandates_file, strerror(errno)); /*NOTREACHED*/ } if (fclose(amdf) == EOF) { - error("error [closing %s: %s]", g_amandates_file, strerror(errno)); + error(_("error [closing %s: %s]"), g_amandates_file, strerror(errno)); /*NOTREACHED*/ } amdf = NULL; @@ -258,8 +261,8 @@ enter_record( if(level < 0 || level >= DUMP_LEVELS || dumpdate < amdp->dates[level]) { qname = quote_string(name); /* this is not allowed, but we can ignore it */ - dbprintf(("amandates botch: %s lev %d: new dumpdate %ld old %ld\n", - qname, level, (long) dumpdate, (long) amdp->dates[level])); + dbprintf(_("amandates botch: %s lev %d: new dumpdate %ld old %ld\n"), + qname, level, (long) dumpdate, (long) amdp->dates[level]); amfree(qname); return; } @@ -284,8 +287,8 @@ amandates_updateone( if(level < 0 || level >= DUMP_LEVELS || dumpdate < amdp->dates[level]) { /* this is not allowed, but we can ignore it */ qname = quote_string(name); - dbprintf(("amandates updateone: %s lev %d: new dumpdate %ld old %ld", - name, level, (long) dumpdate, (long) amdp->dates[level])); + dbprintf(_("amandates updateone: %s lev %d: new dumpdate %ld old %ld"), + name, level, (long) dumpdate, (long) amdp->dates[level]); amfree(qname); return; } @@ -312,7 +315,7 @@ import_dumpdates( devname = amname_to_devname(amdp->name); - if((dumpdf = fopen("/etc/dumpdates", "r")) == NULL) { + if((dumpdf = fopen("/var/lib/dumpdates", "r")) == NULL) { amfree(devname); return; }