X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=tape-src%2Foutput-tape.c;h=aad2bceec4e40b99fc27ec89f7fd488e1a9f16d8;hb=fb2bd066c2f8b34addafe48d62550e3033a59431;hp=a344ac31a2e0f11b7ae7b9cc6264325c58c27cee;hpb=12179dea039515c06168c0037d048566a3f623de;p=debian%2Famanda diff --git a/tape-src/output-tape.c b/tape-src/output-tape.c index a344ac3..aad2bce 100644 --- a/tape-src/output-tape.c +++ b/tape-src/output-tape.c @@ -25,6 +25,10 @@ * University of Maryland at College Park */ +/* NOTE: this driver is *deprecated* and should not be used. See the Device API + * in device-src/ for the new implementation. + */ + /* * $Id: output-tape.c,v 1.18 2006/08/22 14:19:39 martinea Exp $ * @@ -80,7 +84,7 @@ tape_tapefd_fsf( char *buffer = NULL; int len = 0; - buflen = MAX_TAPE_BLOCK_BYTES; + buflen = getconf_readblocksize() * 1024; buffer = alloc(buflen); while(--count >= 0) { @@ -94,7 +98,7 @@ tape_tapefd_fsf( } #endif /* } */ -#ifdef UWARE_TAPEIO /* { */ +#ifdef WANT_TAPE_UWARE /* { */ #include @@ -165,7 +169,7 @@ tape_tapefd_weof( } #else /* }{ */ -#ifdef AIX_TAPEIO /* { */ +#ifdef WANT_TAPE_AIX /* { */ #include @@ -251,8 +255,8 @@ tape_tapefd_weof( return ioctl(fd, STIOCTOP, &st); } -#else /* AIX_TAPEIO */ /* }{ */ -#ifdef XENIX_TAPEIO /* { */ +#else /* WANT_TAPE_AIX */ /* }{ */ +#ifdef WANT_TAPE_XENIX /* { */ #include @@ -333,7 +337,7 @@ tape_tapefd_weof( return status; } -#else /* ! AIX_TAPEIO && !XENIX_TAPEIO */ /* }{ */ +#else /* ! WANT_TAPE_AIX && !WANT_TAPE_XENIX */ /* }{ */ #include @@ -455,9 +459,9 @@ tape_tapefd_weof( return ioctl(fd, MTIOCTOP, &mt); } -#endif /* !XENIX_TAPEIO */ /* } */ -#endif /* !AIX_TAPEIO */ /* } */ -#endif /* !UWARE_TAPEIO */ /* } */ +#endif /* !WANT_TAPE_XENIX */ /* } */ +#endif /* !WANT_TAPE_AIX */ /* } */ +#endif /* !WANT_TAPE_UWARE */ /* } */ /* * At this point we have pulled in every conceivable #include file :-), @@ -499,7 +503,7 @@ tape_tape_open( /* * Open failed completely: just return */ - fprintf(stderr, "Opening tapedev %s: got error %s.\n", + g_fprintf(stderr, _("Opening tapedev %s: got error %s.\n"), filename, strerror(errno)); return -1; } @@ -511,7 +515,7 @@ tape_tape_open( timeout -= delay; if (timeout <= 0) { /* Open failed: just return */ - fprintf(stderr, "Opening tapedev %s: not ready.\n", filename); + g_fprintf(stderr, _("Opening tapedev %s: not ready.\n"), filename); return -1; } @@ -530,14 +534,14 @@ tape_tape_open( memset(&mt, 0, SIZEOF(mt)); if (ioctl(ret, MTIOCGET, &mt) < 0) { close(ret); - fprintf(stderr, "tapedev %s is not a tape device!\n", filename); + g_fprintf(stderr, _("tapedev %s is not a tape device!\n"), filename); return -1; } #ifdef GMT_ONLINE if (!GMT_ONLINE(mt.mt_gstat)) { close(ret); - fprintf(stderr, "tapedev %s is offline or has no loaded tape.\n", + g_fprintf(stderr, _("tapedev %s is offline or has no loaded tape.\n"), filename); return -1; } @@ -598,8 +602,8 @@ tape_tapefd_resetofs( * filesize limit (eg OSes with 2 GB filesize limits) on a long tape. */ if (lseek(fd, (off_t)0, SEEK_SET) < 0) { - dbprintf(("tape_tapefd_resetofs: lseek failed: <%s>\n", - strerror(errno))); + dbprintf(_("tape_tapefd_resetofs: lseek failed: <%s>\n"), + strerror(errno)); } }