Changeset 1252


Ignore:
Timestamp:
Mar 20, 2007, 11:48:46 AM (12 years ago)
Author:
bruno
Message:

MDSTAT_FILE is used everywhere (replacing /proc/mdstat strings)

Location:
branches/stable/mondo/src
Files:
4 edited

Legend:

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

    r1249 r1252  
    5353    if (raidno == -1) {
    5454        mr_asprintf(&command,
    55                  "grep \"linear\" /proc/mdstat > /dev/null 2> /dev/null");
     55                 "grep \"linear\" %s > /dev/null 2> /dev/null", MDSTAT_FILE);
    5656    } else {
    5757        mr_asprintf(&command,
    58                  "grep \"raid%d\" /proc/mdstat > /dev/null 2> /dev/null",
    59                  raidno);
     58                 "grep \"raid%d\" %s > /dev/null 2> /dev/null",
     59                 raidno, MDSTAT_FILE);
    6060    }
    6161    log_it("Is raid %d registered? Command = '%s'", raidno, command);
  • branches/stable/mondo/src/common/libmondo-tools.c

    r1221 r1252  
    981981        && !does_file_exist("/etc/raidtab")) {
    982982        log_to_screen
    983             (_("You have RAID partitions but no /etc/raidtab - creating one from /proc/mdstat"));
     983            (_("You have RAID partitions but no /etc/raidtab - creating one from "MDSTAT_FILE));
    984984        create_raidtab_from_mdstat("/etc/raidtab");
    985985    }
  • branches/stable/mondo/src/mondorestore/mondo-prep.c

    r1251 r1252  
    21852185        }
    21862186#else
    2187         fin = fopen("/proc/mdstat", "r");
     2187        fin = fopen(MDSTAT_FILE, "r");
    21882188        if (!fin) {
    2189             log_OS_error("/proc/mdstat");
     2189            log_OS_error(MDSTAT_FILE);
    21902190            return (1);
    21912191        }
  • branches/stable/mondo/src/mondorestore/mondo-rstr-newt.c

    r1206 r1252  
    549549    malloc_string(tmp);
    550550    assert(raidrec != NULL);
    551     system
    552         ("grep Pers /proc/mdstat > /tmp/raid-personalities.txt 2> /dev/null");
     551    mr_asprintf(&tmp,"grep Pers %s > /tmp/raid-personalities.txt 2> /dev/null", MDSTAT_FILE);
     552    system(tmp);
     553    mr_free(tmp);
    553554    mr_asprintf(&personalities,
    554555           last_line_of_file("/tmp/raid-personalities.txt"));
Note: See TracChangeset for help on using the changeset viewer.