Changeset 813 in MondoRescue


Ignore:
Timestamp:
Sep 23, 2006, 10:32:46 AM (18 years ago)
Author:
Bruno Cornec
Message:

Takes Andree's idea to create rather a mr_date() function, that could be put in a lib file later on if we need it elsewhere (first candidate would be mondorestore :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/mondo/mondoarchive/main.c

    r810 r813  
    236236}
    237237
     238/* Return a string containing the date */
     239char *mr_date(void) {
     240   
     241    time_t tcurr;
     242
     243    tcurr = time(NULL);
     244    return(ctime(&tcurr));
     245}
    238246
    239247/*-----------------------------------------------------------*/
     
    251259    int res, retval;
    252260    char *say_at_end;
    253     time_t tcurr;
    254261
    255262/* Make sure I'm root; abort if not */
     
    285292    unlink(MONDO_LOGFILE);
    286293    tcurr = time(NULL);
    287     log_msg(0, "Time started: %s", ctime(&tcurr));
     294    log_msg(0, "Time started: %s", mr_date());
    288295
    289296    /* make sure PATH environmental variable allows access to mkfs, fdisk, etc. */
     
    553560    /* finalize log file with time stamp */
    554561    tcurr = time(NULL);
    555     log_msg(0, "Time finished: %s", ctime(&tcurr));
     562    log_msg(0, "Time finished: %s", mr_date());
    556563
    557564    if (!g_text_mode) {
Note: See TracChangeset for help on using the changeset viewer.