X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famtape.c;h=365c1af73bd0c04b9c21e205ec8ab05a4b10cae9;hb=ae82bdf8b1748623ea97a99d3a2c76d36ee573af;hp=fad6e406b78dda813269e1806307f29110501966;hpb=eefb15c5c04acb3c75f0c704ea664feb1bbae75c;p=debian%2Famanda diff --git a/server-src/amtape.c b/server-src/amtape.c index fad6e40..365c1af 100644 --- a/server-src/amtape.c +++ b/server-src/amtape.c @@ -24,7 +24,7 @@ * file named AUTHORS, in the root directory of this distribution. */ /* - * $Id: amtape.c,v 1.40 2006/01/14 04:37:19 paddy_s Exp $ + * $Id: amtape.c,v 1.47 2006/07/25 18:27:57 martinea Exp $ * * tape changer interface program */ @@ -32,93 +32,94 @@ #include "conffile.h" #include "tapefile.h" #include "taperscan.h" -#include "tapeio.h" #include "clock.h" #include "changer.h" #include "version.h" +#include "device.h" +#include "timestamp.h" /* local functions */ -void usage P((void)); -int main P((int argc, char **argv)); -void reset_changer P((int argc, char **argv)); -void eject_tape P((int argc, char **argv)); -void clean_tape P((int argc, char **argv)); -void load_slot P((int argc, char **argv)); -void load_label P((int argc, char **argv)); -void show_slots P((int argc, char **argv)); -void show_current P((int argc, char **argv)); -void amtape_taper_scan P((int argc, char **argv)); -void show_device P((int argc, char **argv)); -int loadlabel_slot P((void *ud, int rc, char *slotstr, char *device)); -int show_init P((void *ud, int rc, int ns, int bk, int s)); -int show_init_all P((void *ud, int rc, int ns, int bk, int s)); -int show_init_current P((void *ud, int rc, int ns, int bk, int s)); -int show_slot P((void *ud, int rc, char *slotstr, char *device)); +static void usage(void); +int main(int argc, char **argv); +static void reset_changer(int argc, char **argv); +static void eject_tape(int argc, char **argv); +static void clean_tape(int argc, char **argv); +static void load_slot(int argc, char **argv); +static void load_label(int argc, char **argv); +static void show_slots(int argc, char **argv); +static void show_current(int argc, char **argv); +static void amtape_taper_scan(int argc, char **argv); +static void show_device(int argc, char **argv); +static int loadlabel_slot(void *ud, int rc, char *slotstr, char *device); +int show_init(void *ud, int rc, int ns, int bk, int s); +static int show_slots_slot(void *ud, int rc, char *slotstr, char *device); static const struct { const char *name; - void (*fn) P((int, char **)); + void (*fn)(int, char **); const char *usage; } cmdtab[] = { { "reset", reset_changer, - "reset Reset changer to known state" }, + T_("reset Reset changer to known state") }, { "eject", eject_tape, - "eject Eject current tape from drive" }, + T_("eject Eject current tape from drive") }, { "clean", clean_tape, - "clean Clean the drive" }, + T_("clean Clean the drive") }, { "show", show_slots, - "show Show contents of all slots" }, + T_("show Show contents of all slots") }, { "current", show_current, - "current Show contents of current slot" }, + T_("current Show contents of current slot") }, { "slot" , load_slot, - "slot load tape from slot " }, + T_("slot load tape from slot ") }, { "slot" , load_slot, - "slot current load tape from current slot" }, + T_("slot current load tape from current slot") }, { "slot" , load_slot, - "slot prev load tape from previous slot" }, + T_("slot next load tape from next slot") }, { "slot" , load_slot, - "slot next load tape from next slot" }, + T_("slot advance advance to next slot but do not load") }, { "slot" , load_slot, - "slot advance advance to next slot but do not load" }, - { "slot" , load_slot, - "slot first load tape from first slot" }, - { "slot" , load_slot, - "slot last load tape from last slot" }, + T_("slot first load tape from first slot") }, { "label", load_label, - "label