Changeset 1648


Ignore:
Timestamp:
Sep 24, 2007, 3:29:03 AM (12 years ago)
Author:
bruno
Message:

Fix remaining issue on libmondo-verify

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mondo/src/common/libmondo-verify.c

    r1645 r1648  
    115115//static char cvsid[] = "$Id$";
    116116
    117 char *vfy_tball_fname(struct s_bkpinfo *, char *, int);
    118 
    119 
    120117/**
    121118 * The number of the most recently verified afioball.
     
    130127/* Reference to global bkpinfo */
    131128extern struct s_bkpinfo *bkpinfo;
     129
     130
     131/**
     132 * Generate the filename of a tarball to verify.
     133 * @param bkpinfo The backup information structure. @c bkpinfo->zip_suffix is the only field used.
     134 * @param mountpoint The directory where the CD/DVD/ISO is mounted.
     135 * @param setno The afioball number to get the location of.
     136 * @return The absolute path to the afioball.
     137 * @note The returned string points to static data that will be overwritten with each call.
     138 * @ingroup stringGroup
     139 */
     140char *vfy_tball_fname(char *mountpoint, int setno)
     141{
     142    /*@ buffers ******************************************************* */
     143    static char output[MAX_STR_LEN];
     144
     145    assert(bkpinfo != NULL);
     146    assert_string_is_neither_NULL_nor_zerolength(mountpoint);
     147    sprintf(output, "%s/archives/%d.star.%s", mountpoint, setno,
     148            bkpinfo->zip_suffix);
     149    if (!does_file_exist(output)) {
     150        sprintf(output, "%s/archives/%d.afio.%s", mountpoint, setno,
     151                bkpinfo->zip_suffix);
     152    }
     153    return (output);
     154}
     155
    132156
    133157/**
     
    12191243
    12201244
    1221 /**
    1222  * Generate the filename of a tarball to verify.
    1223  * @param bkpinfo The backup information structure. @c bkpinfo->zip_suffix is the only field used.
    1224  * @param mountpoint The directory where the CD/DVD/ISO is mounted.
    1225  * @param setno The afioball number to get the location of.
    1226  * @return The absolute path to the afioball.
    1227  * @note The returned string points to static data that will be overwritten with each call.
    1228  * @ingroup stringGroup
    1229  */
    1230 char *vfy_tball_fname(char *mountpoint, int setno)
    1231 {
    1232     /*@ buffers ******************************************************* */
    1233     static char output[MAX_STR_LEN];
    1234 
    1235     assert(bkpinfo != NULL);
    1236     assert_string_is_neither_NULL_nor_zerolength(mountpoint);
    1237     sprintf(output, "%s/archives/%d.star.%s", mountpoint, setno,
    1238             bkpinfo->zip_suffix);
    1239     if (!does_file_exist(output)) {
    1240         sprintf(output, "%s/archives/%d.afio.%s", mountpoint, setno,
    1241                 bkpinfo->zip_suffix);
    1242     }
    1243     return (output);
    1244 }
Note: See TracChangeset for help on using the changeset viewer.