Changeset 1369 in MondoRescue
- Timestamp:
- Apr 30, 2007, 2:04:01 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-stream.c
r1365 r1369 15 15 #include "mr_mem.h" 16 16 #include "mr_msg.h" 17 #include "mr_list.h" 17 18 18 19 #include "mondostructures.h" … … 95 96 * made of a list of @p s_tapecat_entry. 96 97 * */ 97 static struct mr_list * g_tapecatalog;98 static struct mr_list *tapecatalog; 98 99 99 100 /* function to free the fname field allocated in te */ … … 177 178 } 178 179 mr_free(blk); 179 mr_free_fname(g_tapecatalog); 180 mr_list_free(g_tapecatalog); 180 mr_list_free(tapecatalog); 181 181 return (retval); 182 182 } … … 226 226 paranoid_pclose(g_tape_stream); 227 227 log_it("closeout_tape() -- leaving"); 228 elt = g_tapecatalog->first;228 elt = tapecatalog->first; 229 229 while (elt != NULL) { 230 230 te = (struct s_tapecat_entry *)elt->data; … … 236 236 } 237 237 mr_free(blk); 238 mr_free_fname(g_tapecatalog); 239 mr_list_free(g_tapecatalog); 238 mr_list_free(tapecatalog); 240 239 return (retval); 241 240 } … … 508 507 long long final_alleged_writeK, final_projected_certain_writeK, 509 508 final_actually_certain_writeK = 0, cposK, bufsize_K; 510 int last, curr,i;509 int last, i; 511 510 t_archtype type = other; 512 511 char *command = NULL; … … 536 535 mr_free(command); 537 536 538 last = mr_list_length( g_tapecatalog) - 1;537 last = mr_list_length(tapecatalog) - 1; 539 538 if (last <= 0) { 540 539 iamhere("Too early to start deleting from collection."); 541 540 return (0); 542 541 } 543 elt = g_tapecatalog->last;542 elt = tapecatalog->last; 544 543 te = (struct s_tapecat_entry *)elt->data; 545 544 final_alleged_writeK = te->tape_posK; … … 640 639 641 640 assert_string_is_neither_NULL_nor_zerolength(bkpinfo->media_device); 642 mr_list_alloc( g_tapecatalog);641 mr_list_alloc(tapecatalog); 643 642 g_tape_posK = 0; 644 643 if (g_tape_stream) { … … 736 735 /* initialise the catalog */ 737 736 g_current_media_number = 1; 738 mr_list_alloc( g_tapecatalog);737 mr_list_alloc(tapecatalog); 739 738 /* log stuff */ 740 739 log_it("Opening OUT cdstream with the command"); … … 766 765 return (0); 767 766 } 768 mr_list_alloc( g_tapecatalog);767 mr_list_alloc(tapecatalog); 769 768 g_tape_posK = 0; 770 769 … … 1085 1084 1086 1085 // returns the index of the record we've just added 1087 return (mr_list_length( g_tapecatalog));1086 return (mr_list_length(tapecatalog)); 1088 1087 } 1089 1088 … … 1358 1357 1359 1358 mr_msg(2, "I am now writing back catalog to tape"); 1360 elt = g_tapecatalog->first;1359 elt = tapecatalog->first; 1361 1360 while (elt != NULL) { 1362 1361 te = (struct s_tapecat_entry *) elt->data;
Note:
See TracChangeset
for help on using the changeset viewer.