X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famtape.c;h=365c1af73bd0c04b9c21e205ec8ab05a4b10cae9;hb=2627875b7d18858bc1f9f7652811e4d8c15a23eb;hp=4075ea44e2ef75d78c46a868e0d1cd60c7d5d506;hpb=d3b2175e084f88c8736ad7073eacbf4670147aec;p=debian%2Famanda diff --git a/server-src/amtape.c b/server-src/amtape.c index 4075ea4..365c1af 100644 --- a/server-src/amtape.c +++ b/server-src/amtape.c @@ -32,30 +32,27 @@ #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(void); +static void usage(void); int main(int argc, char **argv); -void reset_changer(int argc, char **argv); -void eject_tape(int argc, char **argv); -void clean_tape(int argc, char **argv); -void load_slot(int argc, char **argv); -void load_label(int argc, char **argv); -void show_slots(int argc, char **argv); -void show_current(int argc, char **argv); -void update_labeldb (int argc, char **argv); -void amtape_taper_scan(int argc, char **argv); -void show_device(int argc, char **argv); -int update_one_slot (void *ud, int rc, char *slotstr, char *device); -int loadlabel_slot(void *ud, int rc, char *slotstr, char *device); +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); -int show_init_all(void *ud, int rc, int ns, int bk, int s); -int show_init_current(void *ud, int rc, int ns, int bk, int s); -int show_slot(void *ud, int rc, char *slotstr, char *device); +static int show_slots_slot(void *ud, int rc, char *slotstr, char *device); static const struct { const char *name; @@ -63,49 +60,45 @@ static const struct { 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