Changeset 1086 in MondoRescue for trunk/mondo/src/common/libmondo-tools.c


Ignore:
Timestamp:
Feb 2, 2007, 11:21:27 PM (17 years ago)
Author:
Bruno Cornec
Message:

log_msg => mr_msg in trunk

File:
1 edited

Legend:

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

    r1081 r1086  
    232232        }
    233233    }
    234 //  log_msg(1, "tmp = '%s'", tmp);
     234//  mr_msg(1, "tmp = '%s'", tmp);
    235235    d = atof(tmp);
    236236#endif
    237     log_msg(1, "g_kernel_version = %f", d);
     237    mr_msg(1, "g_kernel_version = %f", d);
    238238    return (d);
    239239}
     
    368368        1024;
    369369
    370     log_msg(1, "Foo");
     370    mr_msg(1, "Foo");
    371371    if (bkpinfo->backup_media_type == tape) {
    372         log_msg(1, "Bar");
     372        mr_msg(1, "Bar");
    373373        mr_asprintf(&tmp, "mt -f %s status", bkpinfo->media_device);
    374         log_msg(1, "tmp = '%s'", tmp);
     374        mr_msg(1, "tmp = '%s'", tmp);
    375375        if (run_program_and_log_output(tmp, 3)) {
    376376            fatal_error
     
    496496            mr_free(command);
    497497        }
    498         log_msg(2, "call_make_iso (DVD res) is ... %s",
     498        mr_msg(2, "call_make_iso (DVD res) is ... %s",
    499499                bkpinfo->call_make_iso);
    500500    }                           // end of DVD code
     
    739739    int i = 0;
    740740
    741     log_msg(1, "Hi");
     741    mr_msg(1, "Hi");
    742742
    743743    assert(bkpinfo != NULL);
     
    10581058         else if (strstr(value, "/dev/") && strstr(value, "t0")
    10591059               && !strcmp(label, "media-dev")) {
    1060         log_msg(2, "FYI, I shan't read new value for %s - already got %s",
     1060        mr_msg(2, "FYI, I shan't read new value for %s - already got %s",
    10611061                label, value);
    10621062        return (0);
     
    11141114    char *command;
    11151115
    1116     log_msg(1, "Started sub");
    1117     log_msg(4, "Setting command to something");
     1116    mr_msg(1, "Started sub");
     1117    mr_msg(4, "Setting command to something");
    11181118    mr_asprintf(&command,
    11191119             "grep -v ':' /etc/fstab | grep -vE '^#.*$' | grep -E \"[   ]/boot[     ]\" | tr -s ' ' '\t' | cut -f1 | head -n1");
    1120     log_msg(4, "Cool. Command = '%s'", command);
     1120    mr_msg(4, "Cool. Command = '%s'", command);
    11211121    tmp = call_program_and_get_last_line_of_output(command);
    11221122    mr_free(command);
    11231123
    1124     log_msg(4, "tmp = '%s'", tmp);
     1124    mr_msg(4, "tmp = '%s'", tmp);
    11251125    if (tmp) {
    11261126        log_it("/boot is at %s according to /etc/fstab", tmp);
     
    11291129                mr_free(g_boot_mountpt);
    11301130                mr_asprintf(&g_boot_mountpt, "/boot");
    1131                 log_msg(1, "Mounted /boot");
     1131                mr_msg(1, "Mounted /boot");
    11321132            } else {
    11331133                log_it("...ignored cos it's a label :-)");
     
    11351135        } else {
    11361136            mr_asprintf(&command, "mount | grep -E '^%s'", tmp);
    1137             log_msg(3, "command = %s", command);
     1137            mr_msg(3, "command = %s", command);
    11381138            if (run_program_and_log_output(command, 5)) {
    11391139                mr_free(g_boot_mountpt);
     
    11511151                    mr_asprintf(&g_boot_mountpt, " ");
    11521152                    */
    1153                     log_msg(1, "Plan B");
     1153                    mr_msg(1, "Plan B");
    11541154                    if (!run_program_and_log_output("mount /boot", 5)) {
    11551155                        mr_free(g_boot_mountpt);
    11561156                        mr_asprintf(&g_boot_mountpt, "/boot");
    1157                         log_msg(1, "Plan B worked");
     1157                        mr_msg(1, "Plan B worked");
    11581158                    } else {
    1159                         log_msg(1,
     1159                        mr_msg(1,
    11601160                                "Plan B failed. Unable to mount /boot for backup purposes. This probably means /boot is mounted already, or doesn't have its own partition.");
    11611161                    }
     
    11671167    }
    11681168    mr_free(tmp);
    1169     log_msg(1, "Ended sub");
     1169    mr_msg(1, "Ended sub");
    11701170}
    11711171
     
    11781178    char *tmp;
    11791179
    1180     log_msg(3, "starting");
     1180    mr_msg(3, "starting");
    11811181    if (g_boot_mountpt != NULL) {
    11821182        mr_asprintf(&tmp, "umount %s", g_boot_mountpt);
     
    11861186        mr_free(tmp);
    11871187    }
    1188     log_msg(3, "leaving");
     1188    mr_msg(3, "leaving");
    11891189}
    11901190
     
    12911291           ("ps ax | grep -w magicdev | grep -v grep | tr -s '\t' ' '| cut -d' ' -f6-99");
    12921292    if (g_magicdev_command) {
    1293         log_msg(1, "g_magicdev_command = '%s'", g_magicdev_command);
     1293        mr_msg(1, "g_magicdev_command = '%s'", g_magicdev_command);
    12941294        paranoid_system("killall magicdev");
    12951295    }
Note: See TracChangeset for help on using the changeset viewer.