Changeset 2936 in MondoRescue


Ignore:
Timestamp:
Jan 28, 2012, 1:26:17 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • Improve again scanbus regexp analysis (using -E optin for grep)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/src/common/libmondo-devices.c

    r2934 r2936  
    559559    if (find_home_of_exe(cdr_exe)) {
    560560        sprintf(command,
    561                 "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep '[D|C][V|D]' | cut -d' ' -f2 | head -n1",
     561                "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -E '[D|C][V|D]' | cut -d' ' -f2 | head -n1",
    562562                cdr_exe);
    563563        mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));
     
    871871
    872872    sprintf(command,
    873             "%s -scanbus | grep \"[0-9],[0-9],[0-9]\" | grep \"[D|C][V|D]\" | grep -n \"\" | grep \"%s\" | cut -d':' -f2",
     873            "%s -scanbus | grep \"[0-9],[0-9],[0-9]\" | grep -E \"[D|C][V|D]\" | grep -n \"\" | grep \"%s\" | cut -d':' -f2",
    874874            cdr_exe, g_cdrw_drive_is_here);
    875875    log_msg(1, "command=%s", command);
Note: See TracChangeset for help on using the changeset viewer.