From a501a6cefd6d78e2002029e6ae263d56c7bf932f Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 25 Apr 2004 13:13:39 +0000 Subject: [PATCH] Cleanups git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1302 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 1 + bacula/src/lib/btime.h | 40 +++++++++++++++++++------------------- bacula/src/stored/askdir.c | 2 +- bacula/src/stored/status.c | 3 ++- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/bacula/kernstodo b/bacula/kernstodo index b51a173b0f..6ebe117daa 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -43,6 +43,7 @@ For 1.33 Testing/Documentation: For version 1.35: +- Possibly implement: Action = Unmount Device="TapeDrive1" in Admin jobs. - Setup lrrd graphs: (http://www.linpro.no/projects/lrrd/) Mike Acar. - Revisit the question of multiple Volumes (disk) on a single device. - Finish SIGHUP work. diff --git a/bacula/src/lib/btime.h b/bacula/src/lib/btime.h index 9f5b5d1986..d32891c672 100644 --- a/bacula/src/lib/btime.h +++ b/bacula/src/lib/btime.h @@ -8,7 +8,7 @@ */ /* - Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker + Copyright (C) 2000-2004 Kern Sibbald and John Walker This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -46,47 +46,47 @@ utime_t str_to_utime(char *str); /* =========================================================== */ -/* old code deprecated below. Do not use. */ +/* old code deprecated below. Do not use. */ -typedef float64_t fdate_t; /* Date type */ -typedef float64_t ftime_t; /* Time type */ +typedef float64_t fdate_t; /* Date type */ +typedef float64_t ftime_t; /* Time type */ struct date_time { - fdate_t julian_day_number; /* Julian day number */ + fdate_t julian_day_number; /* Julian day number */ ftime_t julian_day_fraction; /* Julian day fraction */ }; /* In arguments and results of the following functions, quantities are expressed as follows. - year Year in the Common Era. The canonical - date of adoption of the Gregorian calendar - (October 5, 1582 in the Julian calendar) - is assumed. + year Year in the Common Era. The canonical + date of adoption of the Gregorian calendar + (October 5, 1582 in the Julian calendar) + is assumed. - month Month index with January 0, December 11. + month Month index with January 0, December 11. - day Day number of month, 1 to 31. + day Day number of month, 1 to 31. */ extern fdate_t date_encode(uint32_t year, uint8_t month, uint8_t day); extern ftime_t time_encode(uint8_t hour, uint8_t minute, uint8_t second, - float32_t second_fraction); + float32_t second_fraction); extern void date_time_encode(struct date_time *dt, - uint32_t year, uint8_t month, uint8_t day, - uint8_t hour, uint8_t minute, uint8_t second, - float32_t second_fraction); + uint32_t year, uint8_t month, uint8_t day, + uint8_t hour, uint8_t minute, uint8_t second, + float32_t second_fraction); extern void date_decode(fdate_t date, uint32_t *year, uint8_t *month, - uint8_t *day); + uint8_t *day); extern void time_decode(ftime_t time, uint8_t *hour, uint8_t *minute, - uint8_t *second, float32_t *second_fraction); + uint8_t *second, float32_t *second_fraction); extern void date_time_decode(struct date_time *dt, - uint32_t *year, uint8_t *month, uint8_t *day, - uint8_t *hour, uint8_t *minute, uint8_t *second, - float32_t *second_fraction); + uint32_t *year, uint8_t *month, uint8_t *day, + uint8_t *hour, uint8_t *minute, uint8_t *second, + float32_t *second_fraction); extern int date_time_compare(struct date_time *dt1, struct date_time *dt2); diff --git a/bacula/src/stored/askdir.c b/bacula/src/stored/askdir.c index bc800d4a8d..7de73ada44 100644 --- a/bacula/src/stored/askdir.c +++ b/bacula/src/stored/askdir.c @@ -340,7 +340,6 @@ int dir_ask_sysop_to_create_appendable_volume(JCR *jcr, DEVICE *dev) } /* First pass, we *know* there are no appendable volumes, so no need to call */ if (!first && dir_find_next_appendable_volume(jcr)) { /* get suggested volume */ - jstat = JS_WaitMount; unmounted = (dev->dev_blocked == BST_UNMOUNTED) || (dev->dev_blocked == BST_UNMOUNTED_WAITING_FOR_SYSOP); /* @@ -355,6 +354,7 @@ int dir_ask_sysop_to_create_appendable_volume(JCR *jcr, DEVICE *dev) Dmsg0(100, "Return 1 from mount without wait.\n"); return 1; } + jstat = JS_WaitMount; if (!dev->poll) { Jmsg(jcr, M_MOUNT, 0, _( "Please mount Volume \"%s\" on Storage Device \"%s\" for Job %s\n" diff --git a/bacula/src/stored/status.c b/bacula/src/stored/status.c index 2c56ba5c02..156f5bd854 100644 --- a/bacula/src/stored/status.c +++ b/bacula/src/stored/status.c @@ -156,7 +156,8 @@ static void send_blocked_status(JCR *jcr, DEVICE *dev) break; case BST_WAITING_FOR_SYSOP: if (jcr->JobStatus == JS_WaitMount) { - bnet_fsend(user, _(" Device is BLOCKED waiting for mount.\n")); + bnet_fsend(user, _(" Device is BLOCKED waiting for mount of volume \"%s\".\n"), + jcr->VolumeName); } else { bnet_fsend(user, _(" Device is BLOCKED waiting for appendable media.\n")); } -- 2.39.5