Changeset 1241 in MondoRescue for branches/stable/mondo/src/common


Ignore:
Timestamp:
Mar 12, 2007, 2:22:55 AM (17 years ago)
Author:
Bruno Cornec
Message:
  • Fix a bug for tape mangement where block size was missing during extract (Michel Loiseleur)
  • Remove turn_wildcard_chars_into_literal_chars and use mr_stresc instead (based on an idea from Michel)
Location:
branches/stable/mondo/src/common
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/libmondo-filelist.c

    r1224 r1241  
    451451        mr_msg(8, "Analyzing %s", file_to_analyze);
    452452        /* BERLIOS : to be checked */
    453         mr_asprintf(&strtmp, syscall_sprintf, mr_stresc(file_to_analyze, "`$\\\"", '\\'));
     453        mr_asprintf(&strtmp, syscall_sprintf, mr_stresc(file_to_analyze, "`$\\\"", BACKSLASH));
    454454        mr_asprintf(&sys_call, "%s 2>> /dev/null", strtmp);
    455455        mr_free(strtmp);
     
    17091709{
    17101710    int retval = 0;
    1711     struct s_node *found_node;
    1712     FILE *fin;
    1713     FILE *fout;
     1711    struct s_node *found_node = NULL;
     1712    FILE *fin = NULL;
     1713    FILE *fout = NULL;
    17141714    char *fname = NULL;
    1715     char *tmp;
     1715    char *tmp = NULL;
    17161716    size_t len = 0;             // Scrub's patch doesn't work without that
    17171717
     
    17501750                }
    17511751                mr_msg(5, "Found '%s'", fname);
    1752                 turn_wildcard_chars_into_literal_chars(tmp, fname);
     1752                tmp = mr_stresc(fname, WILDCHARS, BACKSLASH);
    17531753                fprintf(fout, "%s\n", tmp);
    17541754                mr_free(tmp);
  • branches/stable/mondo/src/common/libmondo-string-EXT.h

    r1178 r1241  
    3939
    4040extern char *media_descriptor_string(t_bkptype);
    41 
    42 extern inline void turn_wildcard_chars_into_literal_chars(char *out,
    43                                                           char *in);
  • branches/stable/mondo/src/common/libmondo-string.c

    r1195 r1241  
    103103        }
    104104    in_out[i] = '\0';
    105 }
    106 
    107 
    108 inline void turn_wildcard_chars_into_literal_chars(char *strout, char *strin)
    109 {
    110     char *p, *q;
    111 
    112     for (p = strin, q = strout; *p != '\0'; *(q++) = *(p++)) {
    113         if (strchr("[]*?", *p)) {
    114             *(q++) = '\\';
    115         }
    116     }
    117     *q = *p;                    // for the final '\0'
    118105}
    119106
  • branches/stable/mondo/src/common/libmondo-string.h

    r1168 r1241  
    3232char *percent_media_full_comment(struct s_bkpinfo *bkpinfo);
    3333char *media_descriptor_string(t_bkptype);
    34 inline void turn_wildcard_chars_into_literal_chars(char *out, char *in);
Note: See TracChangeset for help on using the changeset viewer.