X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famtape.c;h=365c1af73bd0c04b9c21e205ec8ab05a4b10cae9;hb=c489fc6ad53e4658722b7f63fb40edc6f53c57a9;hp=72dcf17125de2fa3d960bbc72163e08bf9f72c16;hpb=12179dea039515c06168c0037d048566a3f623de;p=debian%2Famanda diff --git a/server-src/amtape.c b/server-src/amtape.c index 72dcf17..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