]> git.sur5r.net Git - bacula/bacula/commitdiff
Misc see kes-1.34
authorKern Sibbald <kern@sibbald.com>
Fri, 28 May 2004 15:45:59 +0000 (15:45 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 28 May 2004 15:45:59 +0000 (15:45 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1370 91ce42f0-d328-0410-95d8-f526ca767f89

18 files changed:
bacula/kernstodo
bacula/src/Makefile.in
bacula/src/console2.glade
bacula/src/dird/fd_cmds.c
bacula/src/dird/run_conf.c
bacula/src/dird/ua_restore.c
bacula/src/dird/ua_select.c
bacula/src/gnome2-console/interface.c
bacula/src/gnome2-console/interface.h
bacula/src/lib/Makefile.in
bacula/src/lib/btimers.c [new file with mode: 0644]
bacula/src/lib/btimers.h [new file with mode: 0644]
bacula/src/lib/lib.h
bacula/src/stored/block.c
bacula/src/stored/btape.c
bacula/src/stored/dev.h
bacula/src/stored/spool.c
bacula/src/version.h

index de3fb4ea952115085e4c026a47e7302cca479736..35f56116b0a40aac28855842192b080a758f4aee 100644 (file)
@@ -1,5 +1,5 @@
                  Kern's ToDo List
-                  31 March 2004
+                  28 May 2004
 
 Documentation to do: (any release a little bit at a time)
 - Document query file format.
@@ -22,6 +22,7 @@ Documentation to do: (any release a little bit at a time)
     changing tape settings while a job is running.)
 - Lookup HP cleaning recommendations.
 - Lookup HP tape replacement recommendations (see trouble shooting autochanger)
+- Add more obvious documentation of @ for conf files.
           
 Testing to do: (painful)
 - Test drive polling!
@@ -43,6 +44,15 @@ For 1.33 Testing/Documentation:
 
 
 For version 1.35:
+- On Win95
+   The error I when I installed 1.34.2 clients:
+    The BACULA-FD file is  
+    linked to missing export KERNEL32.DLL:GetFileAttributesExA.
+- When restore started from console, report jobid.
+- Feedback while the tree is being built.    
+- Possibly implement "Ensure Full Backup = yes" looks for a failed full backup
+  and upgrades the current backup if one exists.
+- Check that barcode reading and update slots scan works.
 - Try not to re-backup a file if a new hard link is added.
 - Backup hard links only, but not the data.
 - Add "All Local = yes" option to save to include all local partitions.
index b04ca9c4475f53241dec9dcd7acbc9ed05dad5f5..c96264a82256287d6735d650eea0ed67810d2916 100644 (file)
@@ -41,7 +41,7 @@ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
 clean:
        @$(RMF) core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
        @$(RMF) AUTHORS ChangeLog Makefile.am NEWS README acconfig.h autogen.sh 
-       @$(RMF) configure.in stamp.h
+       @$(RMF) configure.in stamp.h stamp-h.in
        @$(RMF) -r po
        (cd gnome-console; $(MAKE) clean)
        (cd gnome2-console; $(MAKE) clean)
index 5011ed46effc3e619133bc6a5e1fe1701ef6a8cb..fad86221903d473c25c80d917ab76b258540b2f4 100644 (file)
 
                  <child>
                    <widget class="GtkHBox" id="hbox28">
+                     <property name="border_width">1</property>
                      <property name="visible">True</property>
                      <property name="homogeneous">False</property>
                      <property name="spacing">0</property>
 
                          <child>
                            <widget class="GtkLabel" id="label63">
-                             <property name="width_request">66</property>
+                             <property name="width_request">68</property>
                              <property name="height_request">16</property>
                              <property name="visible">True</property>
                              <property name="label" translatable="yes">Job:</property>
 
              <child>
                <widget class="GtkHBox" id="hbox30">
+                 <property name="border_width">1</property>
                  <property name="visible">True</property>
                  <property name="homogeneous">False</property>
                  <property name="spacing">0</property>
 
                  <child>
                    <widget class="GtkLabel" id="label66">
-                     <property name="width_request">65</property>
+                     <property name="width_request">68</property>
                      <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Client:</property>
 
              <child>
                <widget class="GtkHBox" id="hbox31">
+                 <property name="border_width">1</property>
+                 <property name="width_request">503</property>
+                 <property name="height_request">26</property>
                  <property name="visible">True</property>
                  <property name="homogeneous">False</property>
                  <property name="spacing">0</property>
 
                  <child>
                    <widget class="GtkLabel" id="label68">
-                     <property name="width_request">66</property>
+                     <property name="width_request">68</property>
                      <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">FileSet: </property>
                    </widget>
                    <packing>
                      <property name="padding">0</property>
-                     <property name="expand">True</property>
-                     <property name="fill">True</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkLabel" id="label156">
+                     <property name="width_request">13</property>
+                     <property name="height_request">16</property>
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes"></property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
                    </packing>
                  </child>
 
                  <child>
-                   <widget class="GtkButton" id="view_fileset_button">
-                     <property name="width_request">93</property>
-                     <property name="height_request">26</property>
+                   <widget class="GtkLabel" id="label155">
+                     <property name="width_request">52</property>
+                     <property name="height_request">16</property>
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Priority:</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkSpinButton" id="spinbutton1">
+                     <property name="width_request">81</property>
+                     <property name="height_request">24</property>
                      <property name="visible">True</property>
                      <property name="can_focus">True</property>
-                     <property name="label" translatable="yes">  View FileSet  </property>
-                     <property name="use_underline">True</property>
-                     <property name="relief">GTK_RELIEF_NORMAL</property>
-                     <signal name="clicked" handler="on_view_fileset_clicked"/>
+                     <property name="climb_rate">1</property>
+                     <property name="digits">0</property>
+                     <property name="numeric">False</property>
+                     <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                     <property name="snap_to_ticks">False</property>
+                     <property name="wrap">False</property>
+                     <property name="adjustment">10 0 100 1 10 10</property>
                    </widget>
                    <packing>
-                     <property name="padding">10</property>
+                     <property name="padding">4</property>
                      <property name="expand">False</property>
-                     <property name="fill">True</property>
+                     <property name="fill">False</property>
                    </packing>
                  </child>
 
                  <child>
-                   <widget class="GtkLabel" id="label69">
+                   <widget class="GtkLabel" id="label157">
+                     <property name="width_request">100</property>
+                     <property name="height_request">16</property>
                      <property name="visible">True</property>
-                     <property name="label" translatable="yes">  </property>
+                     <property name="label" translatable="yes"></property>
                      <property name="use_underline">False</property>
                      <property name="use_markup">False</property>
-                     <property name="justify">GTK_JUSTIFY_CENTER</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
                      <property name="wrap">False</property>
                      <property name="selectable">False</property>
                      <property name="xalign">0.5</property>
                      <property name="ypad">0</property>
                    </widget>
                    <packing>
-                     <property name="padding">65</property>
+                     <property name="padding">0</property>
                      <property name="expand">False</property>
                      <property name="fill">False</property>
                    </packing>
 
              <child>
                <widget class="GtkHBox" id="hbox32">
+                 <property name="border_width">1</property>
                  <property name="visible">True</property>
                  <property name="homogeneous">False</property>
                  <property name="spacing">0</property>
 
                  <child>
                    <widget class="GtkLabel" id="label70">
-                     <property name="width_request">66</property>
+                     <property name="width_request">68</property>
                      <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Level:</property>
 
              <child>
                <widget class="GtkHBox" id="hbox33">
+                 <property name="border_width">1</property>
                  <property name="visible">True</property>
                  <property name="homogeneous">False</property>
                  <property name="spacing">0</property>
 
                  <child>
                    <widget class="GtkLabel" id="label72">
-                     <property name="width_request">66</property>
+                     <property name="width_request">68</property>
                      <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Pool:</property>
 
              <child>
                <widget class="GtkHBox" id="hbox39">
+                 <property name="border_width">1</property>
                  <property name="visible">True</property>
                  <property name="homogeneous">False</property>
                  <property name="spacing">0</property>
 
                  <child>
                    <widget class="GtkLabel" id="label96">
-                     <property name="width_request">66</property>
+                     <property name="width_request">68</property>
                      <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Storage:</property>
 
              <child>
                <widget class="GtkHBox" id="hbox40">
+                 <property name="border_width">1</property>
                  <property name="visible">True</property>
                  <property name="homogeneous">False</property>
                  <property name="spacing">0</property>
 
                  <child>
                    <widget class="GtkLabel" id="label98">
-                     <property name="width_request">66</property>
+                     <property name="width_request">68</property>
                      <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Messages:</property>
 
              <child>
                <widget class="GtkHBox" id="hbox34">
+                 <property name="border_width">1</property>
                  <property name="visible">True</property>
                  <property name="homogeneous">False</property>
                  <property name="spacing">0</property>
 
                  <child>
                    <widget class="GtkLabel" id="label77">
-                     <property name="width_request">66</property>
+                     <property name="width_request">68</property>
                      <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Where: </property>
 
          <child>
            <widget class="GtkHBox" id="hbox41">
+             <property name="border_width">1</property>
              <property name="visible">True</property>
              <property name="homogeneous">False</property>
              <property name="spacing">0</property>
 
              <child>
                <widget class="GtkLabel" id="label100">
-                 <property name="width_request">66</property>
+                 <property name="width_request">68</property>
                  <property name="height_request">16</property>
                  <property name="visible">True</property>
                  <property name="label" translatable="yes">When:</property>
            </packing>
          </child>
 
+         <child>
+           <widget class="GtkHBox" id="hbox60">
+             <property name="border_width">1</property>
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">0</property>
+
+             <child>
+               <widget class="GtkLabel" id="label153">
+                 <property name="width_request">68</property>
+                 <property name="height_request">16</property>
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Bootstrap:</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_CENTER</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkEntry" id="entry28">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="editable">True</property>
+                 <property name="visibility">True</property>
+                 <property name="max_length">0</property>
+                 <property name="text" translatable="yes"></property>
+                 <property name="has_frame">True</property>
+                 <property name="invisible_char" translatable="yes">*</property>
+                 <property name="activates_default">False</property>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label154">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">   </property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_CENTER</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="padding">36</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+
          <child>
            <widget class="GtkLabel" id="label84">
+             <property name="width_request">12</property>
+             <property name="height_request">19</property>
              <property name="visible">True</property>
              <property name="label" translatable="yes">   </property>
              <property name="use_underline">False</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">True</property>
-  <property name="default_width">640</property>
-  <property name="default_height">400</property>
+  <property name="default_width">700</property>
+  <property name="default_height">450</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <signal name="delete_event" handler="on_restore_files_delete_event" last_modification_time="Tue, 16 Mar 2004 11:41:52 GMT"/>
       </child>
 
       <child>
-       <widget class="GtkScrolledWindow" id="scrolled">
+       <widget class="GtkHPaned" id="hpaned1">
          <property name="visible">True</property>
          <property name="can_focus">True</property>
-         <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
-         <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-         <property name="shadow_type">GTK_SHADOW_NONE</property>
-         <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 
          <child>
-           <placeholder/>
+           <widget class="GtkScrolledWindow" id="tree">
+             <property name="width_request">164</property>
+             <property name="height_request">78</property>
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+             <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+             <property name="shadow_type">GTK_SHADOW_NONE</property>
+             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+             <child>
+               <placeholder/>
+             </child>
+           </widget>
+           <packing>
+             <property name="shrink">True</property>
+             <property name="resize">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkScrolledWindow" id="scrolled">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+             <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+             <property name="shadow_type">GTK_SHADOW_NONE</property>
+             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+             <child>
+               <placeholder/>
+             </child>
+           </widget>
+           <packing>
+             <property name="shrink">True</property>
+             <property name="resize">True</property>
+           </packing>
          </child>
        </widget>
        <packing>
 
       <child>
        <widget class="GtkHBox" id="hbox44">
+         <property name="width_request">301</property>
+         <property name="height_request">30</property>
          <property name="visible">True</property>
-         <property name="homogeneous">True</property>
+         <property name="homogeneous">False</property>
          <property name="spacing">0</property>
 
          <child>
-           <widget class="GtkLabel" id="label115">
+           <widget class="GtkLabel" id="FilesSelected">
              <property name="visible">True</property>
-             <property name="label" translatable="yes">             </property>
+             <property name="label" translatable="yes">Files Selected: </property>
              <property name="use_underline">False</property>
              <property name="use_markup">False</property>
              <property name="justify">GTK_JUSTIFY_LEFT</property>
              <property name="wrap">False</property>
              <property name="selectable">False</property>
-             <property name="xalign">0.94</property>
+             <property name="xalign">0.02</property>
              <property name="yalign">0.5</property>
              <property name="xpad">0</property>
              <property name="ypad">0</property>
 
          <child>
            <widget class="GtkButton" id="restore_select_ok">
+             <property name="width_request">72</property>
+             <property name="height_request">30</property>
              <property name="visible">True</property>
              <property name="can_focus">True</property>
              <property name="label">gtk-ok</property>
          </child>
 
          <child>
-           <widget class="GtkLabel" id="label116">
+           <widget class="GtkLabel" id="label152">
+             <property name="width_request">34</property>
+             <property name="height_request">16</property>
              <property name="visible">True</property>
              <property name="label" translatable="yes"></property>
              <property name="use_underline">False</property>
          </child>
 
          <child>
-           <widget class="GtkLabel" id="label117">
+           <widget class="GtkLabel" id="label1001">
              <property name="visible">True</property>
-             <property name="label" translatable="yes"></property>
+             <property name="label" translatable="yes"> </property>
              <property name="use_underline">False</property>
              <property name="use_markup">False</property>
              <property name="justify">GTK_JUSTIFY_LEFT</property>
              <property name="ypad">0</property>
            </widget>
            <packing>
-             <property name="padding">0</property>
+             <property name="padding">8</property>
              <property name="expand">False</property>
              <property name="fill">False</property>
            </packing>
          </child>
        </widget>
        <packing>
-         <property name="padding">7</property>
+         <property name="padding">5</property>
          <property name="expand">False</property>
          <property name="fill">True</property>
        </packing>
   </child>
 </widget>
 
+<widget class="GtkDialog" id="progress dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Progress</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox11">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+       <widget class="GtkHButtonBox" id="dialog-action_area10">
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+         <child>
+           <widget class="GtkButton" id="closebutton1">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-close</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="response_id">-7</property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">True</property>
+         <property name="pack_type">GTK_PACK_END</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkVBox" id="vbox19">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkLabel" id="label1002">
+             <property name="width_request">0</property>
+             <property name="height_request">43</property>
+             <property name="visible">True</property>
+             <property name="label" translatable="yes"></property>
+             <property name="use_underline">False</property>
+             <property name="use_markup">False</property>
+             <property name="justify">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label1003">
+             <property name="width_request">0</property>
+             <property name="height_request">36</property>
+             <property name="visible">True</property>
+             <property name="label" translatable="yes"></property>
+             <property name="use_underline">False</property>
+             <property name="use_markup">False</property>
+             <property name="justify">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkProgressBar" id="progressbar1">
+             <property name="width_request">150</property>
+             <property name="height_request">33</property>
+             <property name="visible">True</property>
+             <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+             <property name="fraction">0</property>
+             <property name="pulse_step">0.1</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label1004">
+             <property name="width_request">0</property>
+             <property name="height_request">52</property>
+             <property name="visible">True</property>
+             <property name="label" translatable="yes"></property>
+             <property name="use_underline">False</property>
+             <property name="use_markup">False</property>
+             <property name="justify">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
 </glade-interface>
index 49289929a2f229fe7daec27fa5ffc0efc755d843..28fd36ae852a4964e9af85a1a2c654275c5b86fc 100644 (file)
@@ -40,6 +40,7 @@ static char inc[]         = "include\n";
 static char exc[]         = "exclude\n";
 static char fileset[]     = "fileset\n"; /* set full fileset */
 static char jobcmd[]      = "JobId=%d Job=%s SDid=%u SDtime=%u Authorization=%s\n";
+/* Note, mtime_only is not used here -- implemented as file option */
 static char levelcmd[]    = "level = %s%s mtime_only=%d\n";
 static char runbefore[]   = "RunBeforeJob %s\n";
 static char runafter[]    = "RunAfterJob %s\n";
index 15509951e53d8de812284efb541c6fed687a9fd1..216e5bb864990486fcd70f29d255bddd7ae38fc6 100644 (file)
@@ -124,26 +124,15 @@ static bool have_hour, have_mday, have_wday, have_month, have_wom;
 static bool have_at, have_woy;
 static RUN lrun;
 
-static void clear_defaults()
-{
-   have_hour = have_mday = have_wday = have_month = have_wom = have_woy = true;
-   clear_bit(0,lrun.hour);
-   clear_bits(0, 30, lrun.mday);
-   clear_bits(0, 6, lrun.wday);
-   clear_bits(0, 11, lrun.month);
-   clear_bits(0, 4, lrun.wom);
-   clear_bits(0, 53, lrun.woy);
-}
-
 static void set_defaults()
 {
    have_hour = have_mday = have_wday = have_month = have_wom = have_woy = false;
    have_at = false;
-   set_bit(0,lrun.hour);
+   set_bits(0, 23, lrun.hour);
    set_bits(0, 30, lrun.mday);
-   set_bits(0, 6, lrun.wday);
+   set_bits(0, 6,  lrun.wday);
    set_bits(0, 11, lrun.month);
-   set_bits(0, 4, lrun.wom);
+   set_bits(0, 4,  lrun.wom);
    set_bits(0, 53, lrun.woy);
 }
 
@@ -565,32 +554,22 @@ void store_run(LEX *lc, RES_ITEM *item, int index, int pass)
         }                      
         break;
       case s_hourly:
-        clear_defaults();
+        have_hour = true;
         set_bits(0, 23, lrun.hour);
-        set_bits(0, 30, lrun.mday);
-        set_bits(0, 11, lrun.month);
-        set_bits(0, 4, lrun.wom);
-        set_bits(0, 53, lrun.woy);
         break;
       case s_weekly:
-        clear_defaults();
-        set_bit(0, lrun.wday);
-        set_bits(0, 11, lrun.month);
-        set_bits(0, 4, lrun.wom);
-        set_bits(0, 53, lrun.woy);
-        break;
-      case s_daily:
-        clear_defaults();
+        have_mday = have_wom = have_woy = true;
         set_bits(0, 30, lrun.mday);
-        set_bits(0, 11, lrun.month);
         set_bits(0, 4,  lrun.wom);
         set_bits(0, 53, lrun.woy);
         break;
+      case s_daily:
+        have_mday = true;
+        set_bits(0, 6, lrun.wday);
+        break;
       case s_monthly:
-        clear_defaults();
+        have_month = true;
         set_bits(0, 11, lrun.month);
-        set_bits(0, 4,  lrun.wom);
-        set_bits(0, 53, lrun.woy);
         break;
       default:
          scan_err0(lc, _("Unexpected run state\n"));
index c78822f33c5f4d1ebe2ab85341d55d522044bfd0..ab674e03b3a33b75ff7343cd1cbdef13495cc306 100644 (file)
@@ -762,7 +762,9 @@ static bool build_directory_tree(UAContext *ua, RESTORE_CTX *rx)
         if (node->extract || node->extract_dir) {
             Dmsg2(400, "type=%d FI=%d\n", node->type, node->FileIndex);
            add_findex(rx->bsr, node->JobId, node->FileIndex);
-           rx->selected_files++;
+           if (node->extract) {
+              rx->selected_files++;  /* count only saved files */
+           }
         }
       }
    }
index d211b39b37aaae7c8c2ee1f26c29ce215196094c..991af1fe191a89f17ebc807b3364afc4845e4154 100644 (file)
@@ -802,6 +802,10 @@ STORE *get_storage_resource(UAContext *ua, int use_default)
            break;
 
          } else if (strcasecmp(ua->argk[i], _("job")) == 0) {
+           if (!ua->argv[i]) {
+               bsendmsg(ua, _("Job name not specified.\n"));
+              return NULL;
+           }
            if (!(jcr=get_jcr_by_partial_name(ua->argv[i]))) {
                bsendmsg(ua, _("Job \"%s\" is not running.\n"), ua->argv[i]);
               return NULL;
index 9dbfc71f1dcc0840ee387c3e24c1c53be4facbb3..13eccfc5f43f6c023dbf4e349a2eb6d159a1d2f4 100644 (file)
@@ -626,8 +626,11 @@ create_RunDialog (void)
   GtkWidget *combo_fileset;
   GList *combo_fileset_items = NULL;
   GtkWidget *entry_fileset;
-  GtkWidget *view_fileset_button;
-  GtkWidget *label69;
+  GtkWidget *label156;
+  GtkWidget *label155;
+  GtkObject *spinbutton1_adj;
+  GtkWidget *spinbutton1;
+  GtkWidget *label157;
   GtkWidget *hbox32;
   GtkWidget *label70;
   GtkWidget *combo_level;
@@ -660,6 +663,10 @@ create_RunDialog (void)
   GtkWidget *label100;
   GtkWidget *entry_when;
   GtkWidget *label101;
+  GtkWidget *hbox60;
+  GtkWidget *label153;
+  GtkWidget *entry28;
+  GtkWidget *label154;
   GtkWidget *label84;
   GtkWidget *dialog_action_area6;
   GtkWidget *hbuttonbox1;
@@ -692,6 +699,7 @@ create_RunDialog (void)
   hbox28 = gtk_hbox_new (FALSE, 0);
   gtk_widget_show (hbox28);
   gtk_container_add (GTK_CONTAINER (alignment1), hbox28);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox28), 1);
 
   hbox29 = gtk_hbox_new (FALSE, 0);
   gtk_widget_show (hbox29);
@@ -700,7 +708,7 @@ create_RunDialog (void)
   label63 = gtk_label_new (_("Job:"));
   gtk_widget_show (label63);
   gtk_box_pack_start (GTK_BOX (hbox29), label63, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (label63, 66, 16);
+  gtk_widget_set_size_request (label63, 68, 16);
   gtk_label_set_justify (GTK_LABEL (label63), GTK_JUSTIFY_RIGHT);
 
   combo_job = gtk_combo_new ();
@@ -744,11 +752,12 @@ create_RunDialog (void)
   hbox30 = gtk_hbox_new (FALSE, 0);
   gtk_widget_show (hbox30);
   gtk_box_pack_start (GTK_BOX (vbox12), hbox30, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox30), 1);
 
   label66 = gtk_label_new (_("Client:"));
   gtk_widget_show (label66);
   gtk_box_pack_start (GTK_BOX (hbox30), label66, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (label66, 65, 16);
+  gtk_widget_set_size_request (label66, 68, 16);
   gtk_label_set_justify (GTK_LABEL (label66), GTK_JUSTIFY_RIGHT);
 
   combo_client = gtk_combo_new ();
@@ -772,18 +781,20 @@ create_RunDialog (void)
   hbox31 = gtk_hbox_new (FALSE, 0);
   gtk_widget_show (hbox31);
   gtk_box_pack_start (GTK_BOX (vbox12), hbox31, TRUE, TRUE, 2);
+  gtk_widget_set_size_request (hbox31, 503, 26);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox31), 1);
 
   label68 = gtk_label_new (_("FileSet: "));
   gtk_widget_show (label68);
   gtk_box_pack_start (GTK_BOX (hbox31), label68, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (label68, 66, 16);
+  gtk_widget_set_size_request (label68, 68, 16);
   gtk_label_set_justify (GTK_LABEL (label68), GTK_JUSTIFY_RIGHT);
 
   combo_fileset = gtk_combo_new ();
   g_object_set_data (G_OBJECT (GTK_COMBO (combo_fileset)->popwin),
                      "GladeParentKey", combo_fileset);
   gtk_widget_show (combo_fileset);
-  gtk_box_pack_start (GTK_BOX (hbox31), combo_fileset, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (hbox31), combo_fileset, FALSE, FALSE, 0);
   gtk_combo_set_value_in_list (GTK_COMBO (combo_fileset), TRUE, FALSE);
   combo_fileset_items = g_list_append (combo_fileset_items, (gpointer) "");
   gtk_combo_set_popdown_strings (GTK_COMBO (combo_fileset), combo_fileset_items);
@@ -793,23 +804,39 @@ create_RunDialog (void)
   gtk_widget_show (entry_fileset);
   gtk_editable_set_editable (GTK_EDITABLE (entry_fileset), FALSE);
 
-  view_fileset_button = gtk_button_new_with_mnemonic (_("  View FileSet  "));
-  gtk_widget_show (view_fileset_button);
-  gtk_box_pack_start (GTK_BOX (hbox31), view_fileset_button, FALSE, TRUE, 10);
-  gtk_widget_set_size_request (view_fileset_button, 93, 26);
-
-  label69 = gtk_label_new (_("  "));
-  gtk_widget_show (label69);
-  gtk_box_pack_start (GTK_BOX (hbox31), label69, FALSE, FALSE, 65);
+  label156 = gtk_label_new ("");
+  gtk_widget_show (label156);
+  gtk_box_pack_start (GTK_BOX (hbox31), label156, FALSE, FALSE, 0);
+  gtk_widget_set_size_request (label156, 13, 16);
+  gtk_label_set_justify (GTK_LABEL (label156), GTK_JUSTIFY_LEFT);
+
+  label155 = gtk_label_new (_("Priority:"));
+  gtk_widget_show (label155);
+  gtk_box_pack_start (GTK_BOX (hbox31), label155, FALSE, FALSE, 0);
+  gtk_widget_set_size_request (label155, 52, 16);
+  gtk_label_set_justify (GTK_LABEL (label155), GTK_JUSTIFY_LEFT);
+
+  spinbutton1_adj = gtk_adjustment_new (10, 0, 100, 1, 10, 10);
+  spinbutton1 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton1_adj), 1, 0);
+  gtk_widget_show (spinbutton1);
+  gtk_box_pack_start (GTK_BOX (hbox31), spinbutton1, FALSE, FALSE, 4);
+  gtk_widget_set_size_request (spinbutton1, 81, 24);
+
+  label157 = gtk_label_new ("");
+  gtk_widget_show (label157);
+  gtk_box_pack_start (GTK_BOX (hbox31), label157, FALSE, FALSE, 0);
+  gtk_widget_set_size_request (label157, 100, 16);
+  gtk_label_set_justify (GTK_LABEL (label157), GTK_JUSTIFY_LEFT);
 
   hbox32 = gtk_hbox_new (FALSE, 0);
   gtk_widget_show (hbox32);
   gtk_box_pack_start (GTK_BOX (vbox12), hbox32, TRUE, TRUE, 2);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox32), 1);
 
   label70 = gtk_label_new (_("Level:"));
   gtk_widget_show (label70);
   gtk_box_pack_start (GTK_BOX (hbox32), label70, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (label70, 66, 16);
+  gtk_widget_set_size_request (label70, 68, 16);
   gtk_label_set_justify (GTK_LABEL (label70), GTK_JUSTIFY_RIGHT);
 
   combo_level = gtk_combo_new ();
@@ -834,11 +861,12 @@ create_RunDialog (void)
   hbox33 = gtk_hbox_new (FALSE, 0);
   gtk_widget_show (hbox33);
   gtk_box_pack_start (GTK_BOX (vbox12), hbox33, TRUE, TRUE, 2);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox33), 1);
 
   label72 = gtk_label_new (_("Pool:"));
   gtk_widget_show (label72);
   gtk_box_pack_start (GTK_BOX (hbox33), label72, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (label72, 66, 16);
+  gtk_widget_set_size_request (label72, 68, 16);
 
   combo_pool = gtk_combo_new ();
   g_object_set_data (G_OBJECT (GTK_COMBO (combo_pool)->popwin),
@@ -862,11 +890,12 @@ create_RunDialog (void)
   hbox39 = gtk_hbox_new (FALSE, 0);
   gtk_widget_show (hbox39);
   gtk_box_pack_start (GTK_BOX (vbox12), hbox39, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox39), 1);
 
   label96 = gtk_label_new (_("Storage:"));
   gtk_widget_show (label96);
   gtk_box_pack_start (GTK_BOX (hbox39), label96, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (label96, 66, 16);
+  gtk_widget_set_size_request (label96, 68, 16);
 
   combo_storage = gtk_combo_new ();
   g_object_set_data (G_OBJECT (GTK_COMBO (combo_storage)->popwin),
@@ -890,11 +919,12 @@ create_RunDialog (void)
   hbox40 = gtk_hbox_new (FALSE, 0);
   gtk_widget_show (hbox40);
   gtk_box_pack_start (GTK_BOX (vbox12), hbox40, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox40), 1);
 
   label98 = gtk_label_new (_("Messages:"));
   gtk_widget_show (label98);
   gtk_box_pack_start (GTK_BOX (hbox40), label98, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (label98, 66, 16);
+  gtk_widget_set_size_request (label98, 68, 16);
 
   combo_messages = gtk_combo_new ();
   g_object_set_data (G_OBJECT (GTK_COMBO (combo_messages)->popwin),
@@ -917,11 +947,12 @@ create_RunDialog (void)
   hbox34 = gtk_hbox_new (FALSE, 0);
   gtk_widget_show (hbox34);
   gtk_box_pack_start (GTK_BOX (vbox12), hbox34, TRUE, TRUE, 2);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox34), 1);
 
   label77 = gtk_label_new (_("Where: "));
   gtk_widget_show (label77);
   gtk_box_pack_start (GTK_BOX (hbox34), label77, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (label77, 66, 16);
+  gtk_widget_set_size_request (label77, 68, 16);
 
   entry_where = gtk_entry_new ();
   gtk_widget_show (entry_where);
@@ -934,11 +965,12 @@ create_RunDialog (void)
   hbox41 = gtk_hbox_new (FALSE, 0);
   gtk_widget_show (hbox41);
   gtk_box_pack_start (GTK_BOX (vbox11), hbox41, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox41), 1);
 
   label100 = gtk_label_new (_("When:"));
   gtk_widget_show (label100);
   gtk_box_pack_start (GTK_BOX (hbox41), label100, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (label100, 66, 16);
+  gtk_widget_set_size_request (label100, 68, 16);
 
   entry_when = gtk_entry_new ();
   gtk_widget_show (entry_when);
@@ -948,9 +980,28 @@ create_RunDialog (void)
   gtk_widget_show (label101);
   gtk_box_pack_start (GTK_BOX (hbox41), label101, FALSE, FALSE, 120);
 
+  hbox60 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox60);
+  gtk_box_pack_start (GTK_BOX (vbox11), hbox60, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox60), 1);
+
+  label153 = gtk_label_new (_("Bootstrap:"));
+  gtk_widget_show (label153);
+  gtk_box_pack_start (GTK_BOX (hbox60), label153, FALSE, FALSE, 0);
+  gtk_widget_set_size_request (label153, 68, 16);
+
+  entry28 = gtk_entry_new ();
+  gtk_widget_show (entry28);
+  gtk_box_pack_start (GTK_BOX (hbox60), entry28, TRUE, TRUE, 0);
+
+  label154 = gtk_label_new (_("   "));
+  gtk_widget_show (label154);
+  gtk_box_pack_start (GTK_BOX (hbox60), label154, FALSE, FALSE, 36);
+
   label84 = gtk_label_new (_("   "));
   gtk_widget_show (label84);
   gtk_box_pack_start (GTK_BOX (vbox11), label84, FALSE, FALSE, 0);
+  gtk_widget_set_size_request (label84, 12, 19);
 
   dialog_action_area6 = GTK_DIALOG (RunDialog)->action_area;
   gtk_widget_show (dialog_action_area6);
@@ -975,9 +1026,6 @@ create_RunDialog (void)
   g_signal_connect ((gpointer) entry_job, "changed",
                     G_CALLBACK (on_entry_job_changed),
                     NULL);
-  g_signal_connect ((gpointer) view_fileset_button, "clicked",
-                    G_CALLBACK (on_view_fileset_clicked),
-                    NULL);
   g_signal_connect ((gpointer) run_ok, "clicked",
                     G_CALLBACK (on_run_ok_clicked),
                     NULL);
@@ -1010,8 +1058,10 @@ create_RunDialog (void)
   GLADE_HOOKUP_OBJECT (RunDialog, label68, "label68");
   GLADE_HOOKUP_OBJECT (RunDialog, combo_fileset, "combo_fileset");
   GLADE_HOOKUP_OBJECT (RunDialog, entry_fileset, "entry_fileset");
-  GLADE_HOOKUP_OBJECT (RunDialog, view_fileset_button, "view_fileset_button");
-  GLADE_HOOKUP_OBJECT (RunDialog, label69, "label69");
+  GLADE_HOOKUP_OBJECT (RunDialog, label156, "label156");
+  GLADE_HOOKUP_OBJECT (RunDialog, label155, "label155");
+  GLADE_HOOKUP_OBJECT (RunDialog, spinbutton1, "spinbutton1");
+  GLADE_HOOKUP_OBJECT (RunDialog, label157, "label157");
   GLADE_HOOKUP_OBJECT (RunDialog, hbox32, "hbox32");
   GLADE_HOOKUP_OBJECT (RunDialog, label70, "label70");
   GLADE_HOOKUP_OBJECT (RunDialog, combo_level, "combo_level");
@@ -1040,6 +1090,10 @@ create_RunDialog (void)
   GLADE_HOOKUP_OBJECT (RunDialog, label100, "label100");
   GLADE_HOOKUP_OBJECT (RunDialog, entry_when, "entry_when");
   GLADE_HOOKUP_OBJECT (RunDialog, label101, "label101");
+  GLADE_HOOKUP_OBJECT (RunDialog, hbox60, "hbox60");
+  GLADE_HOOKUP_OBJECT (RunDialog, label153, "label153");
+  GLADE_HOOKUP_OBJECT (RunDialog, entry28, "entry28");
+  GLADE_HOOKUP_OBJECT (RunDialog, label154, "label154");
   GLADE_HOOKUP_OBJECT (RunDialog, label84, "label84");
   GLADE_HOOKUP_OBJECT_NO_REF (RunDialog, dialog_action_area6, "dialog_action_area6");
   GLADE_HOOKUP_OBJECT (RunDialog, hbuttonbox1, "hbuttonbox1");
@@ -1108,19 +1162,21 @@ create_restore_file_selection (void)
   GtkWidget *hbox38;
   GtkWidget *label88;
   GtkWidget *restore_dir;
+  GtkWidget *hpaned1;
+  GtkWidget *tree;
   GtkWidget *scrolled;
   GtkWidget *hbox44;
-  GtkWidget *label115;
+  GtkWidget *FilesSelected;
   GtkWidget *restore_select_ok;
-  GtkWidget *label116;
+  GtkWidget *label152;
   GtkWidget *restore_select_cancel;
-  GtkWidget *label117;
+  GtkWidget *label1001;
 
   restore_file_selection = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_widget_set_size_request (restore_file_selection, 640, 480);
   gtk_window_set_title (GTK_WINDOW (restore_file_selection), _("Restore File Selection"));
   gtk_window_set_modal (GTK_WINDOW (restore_file_selection), TRUE);
-  gtk_window_set_default_size (GTK_WINDOW (restore_file_selection), 640, 400);
+  gtk_window_set_default_size (GTK_WINDOW (restore_file_selection), 700, 450);
 
   vbox13 = gtk_vbox_new (FALSE, 0);
   gtk_widget_show (vbox13);
@@ -1175,37 +1231,49 @@ create_restore_file_selection (void)
   gtk_widget_show (restore_dir);
   gtk_box_pack_start (GTK_BOX (hbox38), restore_dir, TRUE, TRUE, 0);
 
+  hpaned1 = gtk_hpaned_new ();
+  gtk_widget_show (hpaned1);
+  gtk_box_pack_start (GTK_BOX (vbox13), hpaned1, TRUE, TRUE, 0);
+
+  tree = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_show (tree);
+  gtk_paned_pack1 (GTK_PANED (hpaned1), tree, FALSE, TRUE);
+  gtk_widget_set_size_request (tree, 164, 78);
+
   scrolled = gtk_scrolled_window_new (NULL, NULL);
   gtk_widget_show (scrolled);
-  gtk_box_pack_start (GTK_BOX (vbox13), scrolled, TRUE, TRUE, 0);
+  gtk_paned_pack2 (GTK_PANED (hpaned1), scrolled, TRUE, TRUE);
 
-  hbox44 = gtk_hbox_new (TRUE, 0);
+  hbox44 = gtk_hbox_new (FALSE, 0);
   gtk_widget_show (hbox44);
-  gtk_box_pack_start (GTK_BOX (vbox13), hbox44, FALSE, TRUE, 7);
+  gtk_box_pack_start (GTK_BOX (vbox13), hbox44, FALSE, TRUE, 5);
+  gtk_widget_set_size_request (hbox44, 301, 30);
 
-  label115 = gtk_label_new (_("             "));
-  gtk_widget_show (label115);
-  gtk_box_pack_start (GTK_BOX (hbox44), label115, TRUE, TRUE, 0);
-  gtk_label_set_justify (GTK_LABEL (label115), GTK_JUSTIFY_LEFT);
-  gtk_misc_set_alignment (GTK_MISC (label115), 0.94, 0.5);
+  FilesSelected = gtk_label_new (_("Files Selected: "));
+  gtk_widget_show (FilesSelected);
+  gtk_box_pack_start (GTK_BOX (hbox44), FilesSelected, TRUE, TRUE, 0);
+  gtk_label_set_justify (GTK_LABEL (FilesSelected), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (FilesSelected), 0.02, 0.5);
 
   restore_select_ok = gtk_button_new_from_stock ("gtk-ok");
   gtk_widget_show (restore_select_ok);
   gtk_box_pack_start (GTK_BOX (hbox44), restore_select_ok, FALSE, TRUE, 0);
+  gtk_widget_set_size_request (restore_select_ok, 72, 30);
 
-  label116 = gtk_label_new ("");
-  gtk_widget_show (label116);
-  gtk_box_pack_start (GTK_BOX (hbox44), label116, FALSE, FALSE, 0);
-  gtk_label_set_justify (GTK_LABEL (label116), GTK_JUSTIFY_LEFT);
+  label152 = gtk_label_new ("");
+  gtk_widget_show (label152);
+  gtk_box_pack_start (GTK_BOX (hbox44), label152, FALSE, FALSE, 0);
+  gtk_widget_set_size_request (label152, 34, 16);
+  gtk_label_set_justify (GTK_LABEL (label152), GTK_JUSTIFY_LEFT);
 
   restore_select_cancel = gtk_button_new_from_stock ("gtk-cancel");
   gtk_widget_show (restore_select_cancel);
   gtk_box_pack_start (GTK_BOX (hbox44), restore_select_cancel, FALSE, TRUE, 0);
 
-  label117 = gtk_label_new ("");
-  gtk_widget_show (label117);
-  gtk_box_pack_start (GTK_BOX (hbox44), label117, FALSE, FALSE, 0);
-  gtk_label_set_justify (GTK_LABEL (label117), GTK_JUSTIFY_LEFT);
+  label1001 = gtk_label_new (_(" "));
+  gtk_widget_show (label1001);
+  gtk_box_pack_start (GTK_BOX (hbox44), label1001, FALSE, FALSE, 8);
+  gtk_label_set_justify (GTK_LABEL (label1001), GTK_JUSTIFY_LEFT);
 
   g_signal_connect ((gpointer) restore_file_selection, "delete_event",
                     G_CALLBACK (on_restore_files_delete_event),
@@ -1258,13 +1326,15 @@ create_restore_file_selection (void)
   GLADE_HOOKUP_OBJECT (restore_file_selection, hbox38, "hbox38");
   GLADE_HOOKUP_OBJECT (restore_file_selection, label88, "label88");
   GLADE_HOOKUP_OBJECT (restore_file_selection, restore_dir, "restore_dir");
+  GLADE_HOOKUP_OBJECT (restore_file_selection, hpaned1, "hpaned1");
+  GLADE_HOOKUP_OBJECT (restore_file_selection, tree, "tree");
   GLADE_HOOKUP_OBJECT (restore_file_selection, scrolled, "scrolled");
   GLADE_HOOKUP_OBJECT (restore_file_selection, hbox44, "hbox44");
-  GLADE_HOOKUP_OBJECT (restore_file_selection, label115, "label115");
+  GLADE_HOOKUP_OBJECT (restore_file_selection, FilesSelected, "FilesSelected");
   GLADE_HOOKUP_OBJECT (restore_file_selection, restore_select_ok, "restore_select_ok");
-  GLADE_HOOKUP_OBJECT (restore_file_selection, label116, "label116");
+  GLADE_HOOKUP_OBJECT (restore_file_selection, label152, "label152");
   GLADE_HOOKUP_OBJECT (restore_file_selection, restore_select_cancel, "restore_select_cancel");
-  GLADE_HOOKUP_OBJECT (restore_file_selection, label117, "label117");
+  GLADE_HOOKUP_OBJECT (restore_file_selection, label1001, "label1001");
 
   return restore_file_selection;
 }
@@ -1796,3 +1866,72 @@ create_RestoreDialog (void)
   return RestoreDialog;
 }
 
+GtkWidget*
+create_progress_dialog (void)
+{
+  GtkWidget *progress_dialog;
+  GtkWidget *dialog_vbox11;
+  GtkWidget *vbox19;
+  GtkWidget *label1002;
+  GtkWidget *label1003;
+  GtkWidget *progressbar1;
+  GtkWidget *label1004;
+  GtkWidget *dialog_action_area10;
+  GtkWidget *closebutton1;
+
+  progress_dialog = gtk_dialog_new ();
+  gtk_window_set_title (GTK_WINDOW (progress_dialog), _("Progress"));
+
+  dialog_vbox11 = GTK_DIALOG (progress_dialog)->vbox;
+  gtk_widget_show (dialog_vbox11);
+
+  vbox19 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox19);
+  gtk_box_pack_start (GTK_BOX (dialog_vbox11), vbox19, TRUE, TRUE, 0);
+
+  label1002 = gtk_label_new ("");
+  gtk_widget_show (label1002);
+  gtk_box_pack_start (GTK_BOX (vbox19), label1002, FALSE, FALSE, 0);
+  gtk_widget_set_size_request (label1002, 0, 43);
+  gtk_label_set_justify (GTK_LABEL (label1002), GTK_JUSTIFY_LEFT);
+
+  label1003 = gtk_label_new ("");
+  gtk_widget_show (label1003);
+  gtk_box_pack_start (GTK_BOX (vbox19), label1003, FALSE, FALSE, 0);
+  gtk_widget_set_size_request (label1003, 0, 36);
+  gtk_label_set_justify (GTK_LABEL (label1003), GTK_JUSTIFY_LEFT);
+
+  progressbar1 = gtk_progress_bar_new ();
+  gtk_widget_show (progressbar1);
+  gtk_box_pack_start (GTK_BOX (vbox19), progressbar1, TRUE, FALSE, 0);
+  gtk_widget_set_size_request (progressbar1, 150, 33);
+
+  label1004 = gtk_label_new ("");
+  gtk_widget_show (label1004);
+  gtk_box_pack_start (GTK_BOX (vbox19), label1004, FALSE, FALSE, 0);
+  gtk_widget_set_size_request (label1004, 0, 52);
+  gtk_label_set_justify (GTK_LABEL (label1004), GTK_JUSTIFY_LEFT);
+
+  dialog_action_area10 = GTK_DIALOG (progress_dialog)->action_area;
+  gtk_widget_show (dialog_action_area10);
+  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area10), GTK_BUTTONBOX_END);
+
+  closebutton1 = gtk_button_new_from_stock ("gtk-close");
+  gtk_widget_show (closebutton1);
+  gtk_dialog_add_action_widget (GTK_DIALOG (progress_dialog), closebutton1, GTK_RESPONSE_CLOSE);
+  GTK_WIDGET_SET_FLAGS (closebutton1, GTK_CAN_DEFAULT);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (progress_dialog, progress_dialog, "progress_dialog");
+  GLADE_HOOKUP_OBJECT_NO_REF (progress_dialog, dialog_vbox11, "dialog_vbox11");
+  GLADE_HOOKUP_OBJECT (progress_dialog, vbox19, "vbox19");
+  GLADE_HOOKUP_OBJECT (progress_dialog, label1002, "label1002");
+  GLADE_HOOKUP_OBJECT (progress_dialog, label1003, "label1003");
+  GLADE_HOOKUP_OBJECT (progress_dialog, progressbar1, "progressbar1");
+  GLADE_HOOKUP_OBJECT (progress_dialog, label1004, "label1004");
+  GLADE_HOOKUP_OBJECT_NO_REF (progress_dialog, dialog_action_area10, "dialog_action_area10");
+  GLADE_HOOKUP_OBJECT (progress_dialog, closebutton1, "closebutton1");
+
+  return progress_dialog;
+}
+
index 928ec69e48f56e99d131ed83973e34384eebdec7..899d3c48061b448f5ff8489b0ea6f15fafcac66d 100644 (file)
@@ -9,3 +9,4 @@ GtkWidget* create_RunDialog (void);
 GtkWidget* create_restore_file_selection (void);
 GtkWidget* create_label_dialog (void);
 GtkWidget* create_RestoreDialog (void);
+GtkWidget* create_progress_dialog (void);
index 28cab1eed2ee19ac01187750b8692c380e99f678..f3fcaa480f1c909c175b23038f8432aec771714b 100644 (file)
@@ -39,7 +39,7 @@ LIBSRCS = alloc.c attr.c base64.c bsys.c bget_msg.c \
          md5.c message.c mem_pool.c parse_conf.c \
          queue.c rwlock.c scan.c serial.c sha1.c \
          semlock.c signal.c smartall.c tree.c \
-         util.c var.c watchdog.c workq.c timers.c
+         util.c var.c watchdog.c workq.c btimers.c
 
 
 LIBOBJS = alloc.o attr.o base64.o bsys.o bget_msg.o \
@@ -50,7 +50,7 @@ LIBOBJS = alloc.o attr.o base64.o bsys.o bget_msg.o \
          md5.o message.o mem_pool.o parse_conf.o \
          queue.o rwlock.o scan.o serial.o sha1.o \
          semlock.o signal.o smartall.o tree.o \
-         util.o var.o watchdog.o workq.o timers.o
+         util.o var.o watchdog.o workq.o btimers.o
 
 
 EXTRAOBJS = @OBJLIST@
diff --git a/bacula/src/lib/btimers.c b/bacula/src/lib/btimers.c
new file mode 100644 (file)
index 0000000..d3de553
--- /dev/null
@@ -0,0 +1,247 @@
+/*
+ * Process and thread timer routines, built on top of watchdogs.
+ * 
+ *    Nic Bellamy <nic@bellamy.co.nz>, October 2004.
+ *
+*/
+/*
+   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
+   published by the Free Software Foundation; either version 2 of
+   the License, or (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public
+   License along with this program; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+   MA 02111-1307, USA.
+
+ */
+
+#include "bacula.h"
+#include "jcr.h"
+
+/* Forward referenced functions */
+static void stop_btimer(btimer_t *wid);
+static btimer_t *btimer_start_common(uint32_t wait);
+
+/* Forward referenced callback functions */
+static void callback_child_timer(watchdog_t *self);
+static void callback_thread_timer(watchdog_t *self);
+#ifdef xxx
+static void destructor_thread_timer(watchdog_t *self);
+static void destructor_child_timer(watchdog_t *self);
+#endif
+
+/* 
+ * Start a timer on a child process of pid, kill it after wait seconds.
+ *
+ *  Returns: btimer_t *(pointer to btimer_t struct) on success
+ *          NULL on failure
+ */
+btimer_t *start_child_timer(pid_t pid, uint32_t wait)
+{
+   btimer_t *wid;
+
+   wid = btimer_start_common(wait);
+   if (wid == NULL) {
+      return NULL;
+   }
+   wid->type = TYPE_CHILD;
+   wid->pid = pid;
+   wid->killed = false;
+
+   wid->wd->callback = callback_child_timer;
+   wid->wd->one_shot = false;
+   wid->wd->interval = wait;
+   register_watchdog(wid->wd);
+
+   Dmsg3(200, "Start child timer %p, pid %d for %d secs.\n", wid, pid, wait);
+   return wid;
+}
+
+/*
+ * Stop child timer
+ */
+void stop_child_timer(btimer_t *wid)
+{
+   if (wid == NULL) {
+      Dmsg0(200, "stop_child_timer called with NULL btimer_id\n");
+      return;
+   }
+   Dmsg2(200, "Stop child timer %p pid %d\n", wid, wid->pid);
+   stop_btimer(wid);
+}
+
+#ifdef xxx
+static void destructor_child_timer(watchdog_t *self)
+{
+   btimer_t *wid = (btimer_t *)self->data;
+   free(wid->wd);
+   free(wid);
+}
+#endif
+
+static void callback_child_timer(watchdog_t *self)
+{
+   btimer_t *wid = (btimer_t *)self->data;
+
+   if (!wid->killed) {
+      /* First kill attempt; try killing it softly (kill -SONG) first */
+      wid->killed = true;
+
+      Dmsg2(200, "watchdog %p term PID %d\n", self, wid->pid);
+
+      /* Kill -TERM the specified PID, and reschedule a -KILL for 3 seconds
+       * later.
+       */
+      kill(wid->pid, SIGTERM);
+      self->interval = 3;
+   } else {
+      /* This is the second call - terminate with prejudice. */
+      Dmsg2(200, "watchdog %p kill PID %d\n", self, wid->pid);
+
+      kill(wid->pid, SIGKILL);
+
+      /* Setting one_shot to true before we leave ensures we don't get
+       * rescheduled.
+       */
+      self->one_shot = true;
+   }
+}
+
+/* 
+ * Start a timer on a thread. kill it after wait seconds.
+ *
+ *  Returns: btimer_t *(pointer to btimer_t struct) on success
+ *          NULL on failure
+ */
+btimer_t *start_thread_timer(pthread_t tid, uint32_t wait)
+{
+   btimer_t *wid;
+   wid = btimer_start_common(wait);
+   if (wid == NULL) {
+      return NULL;
+   }
+   wid->type = TYPE_PTHREAD;
+   wid->tid = tid;
+
+   wid->wd->callback = callback_thread_timer;
+   wid->wd->one_shot = true;
+   wid->wd->interval = wait;
+   register_watchdog(wid->wd);
+
+   Dmsg3(200, "Start thread timer %p tid %p for %d secs.\n", wid, tid, wait);
+
+   return wid;
+}
+
+/* 
+ * Start a timer on a BSOCK. kill it after wait seconds.
+ *
+ *  Returns: btimer_t *(pointer to btimer_t struct) on success
+ *          NULL on failure
+ */
+btimer_t *start_bsock_timer(BSOCK *bsock, uint32_t wait)
+{
+   btimer_t *wid;
+   wid = btimer_start_common(wait);
+   if (wid == NULL) {
+      return NULL;
+   }
+   wid->type = TYPE_BSOCK;
+   wid->tid = pthread_self();
+   wid->bsock = bsock;
+
+   wid->wd->callback = callback_thread_timer;
+   wid->wd->one_shot = true;
+   wid->wd->interval = wait;
+   register_watchdog(wid->wd);
+
+   Dmsg3(200, "Start thread timer %p tip %p for %d secs.\n", wid, wid->tid, wait);
+
+   return wid;
+}
+
+/*
+ * Stop bsock timer
+ */
+void stop_bsock_timer(btimer_t *wid)
+{
+   if (wid == NULL) {
+      Dmsg0(200, "stop_bsock_timer called with NULL btimer_id\n");
+      return;
+   }
+   Dmsg2(200, "Stop bsock timer %p tid %p.\n", wid, wid->tid);
+   stop_btimer(wid);
+}
+
+
+/*
+ * Stop thread timer
+ */
+void stop_thread_timer(btimer_t *wid)
+{
+   if (wid == NULL) {
+      Dmsg0(200, "stop_thread_timer called with NULL btimer_id\n");
+      return;
+   }
+   Dmsg2(200, "Stop thread timer %p tid %p.\n", wid, wid->tid);
+   stop_btimer(wid);
+}
+
+#ifdef xxx
+static void destructor_thread_timer(watchdog_t *self)
+{
+   btimer_t *wid = (btimer_t *)self->data;
+   free(wid->wd);
+   free(wid);
+}
+#endif
+
+static void callback_thread_timer(watchdog_t *self)
+{
+   btimer_t *wid = (btimer_t *)self->data;
+
+   Dmsg2(200, "watchdog %p kill thread %d\n", self, wid->tid);
+
+   if (wid->type == TYPE_BSOCK && wid->bsock) {
+      Dmsg0(200, "kill type bsock ...\n");
+      wid->bsock->timed_out = true;
+   }
+   pthread_kill(wid->tid, TIMEOUT_SIGNAL);
+}
+
+static btimer_t *btimer_start_common(uint32_t wait)
+{
+   btimer_t *wid = (btimer_t *)malloc(sizeof(btimer_t));
+
+   wid->wd = new_watchdog();
+   if (wid->wd == NULL) {
+      free(wid);
+      return NULL;
+   }
+   wid->wd->data = wid;
+   wid->killed = FALSE;
+
+   return wid;
+}
+
+/*
+ * Stop btimer
+ */
+static void stop_btimer(btimer_t *wid)
+{
+   if (wid == NULL) {
+      Emsg0(M_ABORT, 0, "stop_btimer called with NULL btimer_id\n");
+   }
+   unregister_watchdog(wid->wd);
+   free(wid->wd);
+   free(wid);
+}
diff --git a/bacula/src/lib/btimers.h b/bacula/src/lib/btimers.h
new file mode 100644 (file)
index 0000000..6b14b53
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Process and thread timer routines, built on top of watchdogs.
+ * 
+ *    Nic Bellamy <nic@bellamy.co.nz>, October 2003.
+ *
+*/
+/*
+   Copyright (C) 2003-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
+   published by the Free Software Foundation; either version 2 of
+   the License, or (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public
+   License along with this program; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+   MA 02111-1307, USA.
+
+ */
+
+typedef struct s_btimer_t {
+   watchdog_t *wd;                   /* Parent watchdog */
+   int type;
+   bool killed;
+   pid_t pid;                        /* process id if TYPE_CHILD */
+   pthread_t tid;                    /* thread id if TYPE_PTHREAD */
+   BSOCK *bsock;                     /* Pointer to BSOCK */
+} btimer_t;
+
+/* EOF */
index 00934170bf1c9b3a7af850bfb4f700fe88a30823..89d9c2948d324090c9b2696eabdd64f13c31845f 100644 (file)
@@ -51,7 +51,7 @@
 #include "sha1.h"
 #include "tree.h"
 #include "watchdog.h"
-#include "timers.h"
+#include "btimers.h"
 #include "bpipe.h"
 #include "attr.h"
 #include "var.h"
index 47c48ca5f1b741723fc3ecf64bed6d3a94c77a19..85f92eed33b877d26317ee75bf913968d505ad82 100644 (file)
@@ -688,6 +688,9 @@ int read_block_from_dev(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, bool check_bloc
    int retry;
    DCR *dcr = jcr->dcr;
 
+   if (!dcr) {
+      Jmsg(jcr, M_ABORT, 0, _("DCR is NULL!\n"));
+   }
    if (dev_state(dev, ST_EOT)) {
       return 0;
    }
index dd6546324a32a56be0a7e290fc1e024729aee154..151554940850e92abe5e2b5d57fc0100107f5934 100644 (file)
@@ -942,7 +942,11 @@ read_again:
             Pmsg0(-1, _("Got EOF on tape.\n"));
            goto read_again;
         }
-         Pmsg1(0, _("Read block failed! ERR=%s\n"), strerror(dev->dev_errno));
+         Pmsg1(0, _("Read block failed! ERR=%s\n\n"), strerror(dev->dev_errno));
+         Pmsg0(0, _("This may be because the tape drive block size is not\n"
+                    " set to variable blocking as normally used by Bacula.\n"
+                    " Please see the Tape Testing chapter in the manual and \n"
+                    " look for using mt with defblksize and setoptions\n"));
         goto bail_out;
       }
       memset(rec->data, 0, rec->data_len);
index 580c3f6aa02d188ffdb8b13b026a1d716a4169c2..e7dbf04a26aa9937969a4edd51117c2665fe6dde 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef __DEV_H
 #define __DEV_H 1
 
+#undef DCR                            /* used by Bacula */
+
 /* #define NEW_LOCK 1 */
 
 #define new_lock_device(dev)             _new_lock_device(__FILE__, __LINE__, (dev)) 
index 902661543bbddf0742050bbf3060fa3ced1bd6ba..65e86d3384d043acd476a7a34e8ad5b33a5310bf 100644 (file)
@@ -67,13 +67,13 @@ void list_spool_stats(BSOCK *bs)
 {
    char ed1[30], ed2[30];
    if (spool_stats.data_jobs || spool_stats.max_data_size) {
-      bnet_fsend(bs, "Data spooling: %d active jobs %s bytes; %d total jobs %s max bytes/job.\n",
+      bnet_fsend(bs, "Data spooling: %d active jobs, %s bytes; %d total jobs, %s max bytes/job.\n",
         spool_stats.data_jobs, edit_uint64_with_commas(spool_stats.data_size, ed1),
         spool_stats.total_data_jobs, 
         edit_uint64_with_commas(spool_stats.max_data_size, ed2));
    }
    if (spool_stats.attr_jobs || spool_stats.max_attr_size) {
-      bnet_fsend(bs, "Attr spooling: %d active jobs; %d total jobs %s max bytes/job.\n",
+      bnet_fsend(bs, "Attr spooling: %d active jobs; %d total jobs, %s max bytes/job.\n",
         spool_stats.attr_jobs, spool_stats.total_attr_jobs, 
         edit_uint64_with_commas(spool_stats.max_attr_size, ed1));
    }
@@ -109,8 +109,12 @@ bool discard_data_spool(JCR *jcr)
 bool commit_data_spool(JCR *jcr)
 {
    bool stat;
+   char ec1[40];
+
    if (jcr->dcr->spooling) {
       Dmsg0(100, "Committing spooled data\n");
+      Jmsg(jcr, M_INFO, 0, _("Writing spooled data to Volume. Despooling %s bytes ...\n"),
+           edit_uint64_with_commas(jcr->dcr->dev->spool_size, ec1));
       stat = despool_data(jcr->dcr);
       if (!stat) {
          Dmsg1(000, "Bad return from despool WroteVol=%d\n", jcr->dcr->WroteVol);
@@ -339,8 +343,9 @@ bool write_block_to_spool_file(DCR *dcr, DEV_BLOCK *block)
    }
    V(mutex);
    if (despool) {
+      char ec1[30];
 #ifdef xDEBUG 
-      char ec1[30], ec2[30], ec3[30], ec4[30];
+      char ec2[30], ec3[30], ec4[30];
       Dmsg4(100, "Despool in write_block_to_spool_file max_size=%s size=%s "
             "max_job_size=%s job_size=%s\n", 
            edit_uint64_with_commas(dcr->max_spool_size, ec1),
@@ -348,12 +353,13 @@ bool write_block_to_spool_file(DCR *dcr, DEV_BLOCK *block)
            edit_uint64_with_commas(dcr->dev->max_spool_size, ec3),
            edit_uint64_with_commas(dcr->dev->spool_size, ec4));
 #endif
-      Jmsg(dcr->jcr, M_INFO, 0, _("User specified spool size reached. Despooling ...\n"));
+      Jmsg(dcr->jcr, M_INFO, 0, _("User specified spool size reached. Despooling %s bytes ...\n"),
+           edit_uint64_with_commas(dcr->dev->spool_size, ec1));
       if (!despool_data(dcr)) {
          Dmsg0(000, "Bad return from despool in write_block.\n");
         return false;
       }
-      /* Despooling cleard these variables so reset them */
+      /* Despooling cleared these variables so reset them */
       P(dcr->dev->spool_mutex);
       dcr->spool_size += hlen + wlen;
       dcr->dev->spool_size += hlen + wlen;
index 0996e32887b243c583dcc330e5f2fa8834529f00..058077b0ae447b6f9f45996523e8eedab255bed6 100644 (file)
@@ -2,8 +2,8 @@
 #undef  VERSION
 #define VERSION "1.34.3"
 #define VSTRING "1"
-#define BDATE   "01 May 2004"
-#define LSMDATE "01May04"
+#define BDATE   "28 May 2004"
+#define LSMDATE "28May04"
 
 /* Debug flags */
 #undef  DEBUG