Ignore:
Timestamp:
Feb 8, 2007, 12:09:34 AM (17 years ago)
Author:
Bruno Cornec
Message:

log_msg => mr_msg for common files

File:
1 edited

Legend:

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

    r1095 r1107  
    229229        }
    230230    }
    231 //  log_msg(1, "tmp = '%s'", tmp);
     231//  mr_msg(1, "tmp = '%s'", tmp);
    232232    d = atof(tmp);
    233233#endif
    234     log_msg(1, "g_kernel_version = %f", d);
     234    mr_msg(1, "g_kernel_version = %f", d);
    235235    return (d);
    236236}
     
    430430        1024;
    431431
    432     log_msg(1, "Foo");
     432    mr_msg(1, "Foo");
    433433    if (bkpinfo->backup_media_type == tape) {
    434         log_msg(1, "Bar");
     434        mr_msg(1, "Bar");
    435435        sprintf(tmp, "mt -f %s status", bkpinfo->media_device);
    436         log_msg(1, "tmp = '%s'", tmp);
     436        mr_msg(1, "tmp = '%s'", tmp);
    437437        if (run_program_and_log_output(tmp, 3)) {
    438438            fatal_error
     
    548548            }       
    549549        }
    550         log_msg(2, "call_make_iso (DVD res) is ... %s",
     550        mr_msg(2, "call_make_iso (DVD res) is ... %s",
    551551                bkpinfo->call_make_iso);
    552552    }                           // end of DVD code
     
    791791    int i;
    792792
    793     log_msg(1, "Hi");
     793    mr_msg(1, "Hi");
    794794    assert(bkpinfo != NULL);
    795795    memset((void *) bkpinfo, 0, sizeof(struct s_bkpinfo));
     
    11021102    } else if (strstr(value, "/dev/") && strstr(value, "t0")
    11031103               && !strcmp(label, "media-dev")) {
    1104         log_msg(2, "FYI, I shan't read new value for %s - already got %s",
     1104        mr_msg(2, "FYI, I shan't read new value for %s - already got %s",
    11051105                label, value);
    11061106        return (0);
     
    11841184
    11851185    if (!g_autofs_exe[0]) {
    1186         log_msg(3, "No autofs detected.");
     1186        mr_msg(3, "No autofs detected.");
    11871187    } else {
    1188         log_msg(3, "%s --- autofs detected", g_autofs_exe);
     1188        mr_msg(3, "%s --- autofs detected", g_autofs_exe);
    11891189// FIXME -- only disable it if it's running ---  sprintf(tmp, "%s status", autofs_exe);
    11901190        sprintf(tmp, "%s stop", g_autofs_exe);
     
    12061206
    12071207    if (!g_autofs_stopped || !g_autofs_exe[0]) {
    1208         log_msg(3, "No autofs detected.");
     1208        mr_msg(3, "No autofs detected.");
    12091209        return;
    12101210    }
     
    12271227    char command[MAX_STR_LEN];
    12281228
    1229     log_msg(1, "Started sub");
    1230     log_msg(4, "About to set g_boot_mountpt[0] to '\\0'");
     1229    mr_msg(1, "Started sub");
     1230    mr_msg(4, "About to set g_boot_mountpt[0] to '\\0'");
    12311231    g_boot_mountpt[0] = '\0';
    1232     log_msg(4, "Done. Great. Seeting command to something");
     1232    mr_msg(4, "Done. Great. Seeting command to something");
    12331233    strcpy(command,
    12341234           "grep -v \":\" /etc/fstab | grep -vE '^#.*$' | grep -E \"[   ]/boot[     ]\" | tr -s ' ' '\t' | cut -f1 | head -n1");
    1235     log_msg(4, "Cool. Command = '%s'", command);
     1235    mr_msg(4, "Cool. Command = '%s'", command);
    12361236    strcpy(tmp, call_program_and_get_last_line_of_output(command));
    1237     log_msg(4, "tmp = '%s'", tmp);
     1237    mr_msg(4, "tmp = '%s'", tmp);
    12381238    if (tmp[0]) {
    12391239        log_it("/boot is at %s according to /etc/fstab", tmp);
     
    12411241            if (!run_program_and_log_output("mount /boot", 5)) {
    12421242                strcpy(g_boot_mountpt, "/boot");
    1243                 log_msg(1, "Mounted /boot");
     1243                mr_msg(1, "Mounted /boot");
    12441244            } else {
    12451245                log_it("...ignored cos it's a label :-)");
     
    12471247        } else {
    12481248            sprintf(command, "mount | grep -E '^%s'", tmp);
    1249             log_msg(3, "command = %s", command);
     1249            mr_msg(3, "command = %s", command);
    12501250            if (run_program_and_log_output(command, 5)) {
    12511251                strcpy(g_boot_mountpt, tmp);
     
    12571257                if (run_program_and_log_output(tmp, 5)) {
    12581258                    g_boot_mountpt[0] = '\0';
    1259                     log_msg(1, "Plan B");
     1259                    mr_msg(1, "Plan B");
    12601260                    if (!run_program_and_log_output("mount /boot", 5)) {
    12611261                        strcpy(g_boot_mountpt, "/boot");
    1262                         log_msg(1, "Plan B worked");
     1262                        mr_msg(1, "Plan B worked");
    12631263                    } else {
    1264                         log_msg(1,
     1264                        mr_msg(1,
    12651265                                "Plan B failed. Unable to mount /boot for backup purposes. This probably means /boot is mounted already, or doesn't have its own partition.");
    12661266                    }
     
    12691269        }
    12701270    }
    1271     log_msg(1, "Ended sub");
     1271    mr_msg(1, "Ended sub");
    12721272}
    12731273
     
    12801280    char tmp[MAX_STR_LEN];
    12811281
    1282     log_msg(3, "starting");
     1282    mr_msg(3, "starting");
    12831283    if (g_boot_mountpt[0]) {
    12841284        sprintf(tmp, "umount %s", g_boot_mountpt);
     
    12871287        }
    12881288    }
    1289     log_msg(3, "leaving");
     1289    mr_msg(3, "leaving");
    12901290}
    12911291
     
    13361336
    13371337/**
    1338  * The standard log_debug_msg() (log_msg() also due to a macro). Writes some describing
     1338 * The standard log_debug_msg() (mr_msg() also due to a macro). Writes some describing
    13391339 * information to the logfile.
    13401340 */
     
    14441444       for(i=0;list_of_arrays[i];i++)
    14451445       {
    1446        log_msg(5, "Allocating %d", i);
     1446       mr_msg(5, "Allocating %d", i);
    14471447       ppcurr = list_of_arrays[i];
    14481448       if (mal)
     
    14561456       }
    14571457       }
    1458        log_msg(5, "Returning");
     1458       mr_msg(5, "Returning");
    14591459     */
    14601460}
     
    14901490           ("ps ax | grep -w magicdev | grep -v grep | tr -s '\t' ' '| cut -d' ' -f6-99"));
    14911491    if (g_magicdev_command[0]) {
    1492         log_msg(1, "g_magicdev_command = '%s'", g_magicdev_command);
     1492        mr_msg(1, "g_magicdev_command = '%s'", g_magicdev_command);
    14931493        paranoid_system("killall magicdev");
    14941494    }
Note: See TracChangeset for help on using the changeset viewer.