Changeset 2053 in MondoRescue for branches/2.2.8/mondo/src


Ignore:
Timestamp:
Oct 23, 2008, 3:16:34 PM (15 years ago)
Author:
Bruno Cornec
Message:

register-pid is gone

Location:
branches/2.2.8/mondo/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.8/mondo/src/common/libmondo-cli.c

    r2036 r2053  
    414414{
    415415    int i = 0;
    416     int lastpos = 0;
    417416    int mount_cnt = 0;
    418417    char *mounted_file_system = NULL;
     
    559558    i = 0;
    560559    lastpos = 0;
    561     while (token = mr_strtok(partition_list, token_chars, &lastpos)) {
     560    while ((token = mr_strtok(partition_list, token_chars, &lastpos)) != NULL) {
    562561        log_msg (5, "Found partition: %s", token);
    563562        strcpy(partitions[i++], token);
     
    654653                    log_msg(4, "  VG %s mount_list: %s", VG, mount_list);
    655654                    lastpos = 0;
    656                     while (token = mr_strtok(mount_list, token_chars, &lastpos)) {
     655                    while ((token = mr_strtok(mount_list, token_chars, &lastpos)) != NULL) {
    657656                        log_msg (5, "mount point token: %s", token);
    658657                        if ((DSFptr = find_mount_point_in_list(token)) == NULL) {
     
    675674                    log_msg(4, "  Software raid device list: %s", mount_list);   
    676675                    lastpos = 0;
    677                     while (token = mr_strtok(mount_list, token_chars, &lastpos)) {
     676                    while ((token = mr_strtok(mount_list, token_chars, &lastpos)) != NULL) {
    678677                        asprintf(&command, "mdadm --detail %s 2>/dev/null | grep -c %s", token, VG);
    679678                        log_msg (5, "Running: %s", command);
     
    728727        /* Loop through the software raid device list to see if we can find the partition */
    729728        lastpos = 0;
    730         while (token = mr_strtok(mount_list, token_chars, &lastpos)) {
     729        while ((token = mr_strtok(mount_list, token_chars, &lastpos)) != NULL) {
    731730            asprintf(&command, "mdadm --detail %s 2>/dev/null | grep -c %s", token, tmp);
    732731            log_msg(4, "  Running: %s", command);
     
    931930        }
    932931        paranoid_free(tmp1);
    933         while (token = mr_strtok(flag_val['I'], token_chars, &lastpos)) {
     932        while ((token = mr_strtok(flag_val['I'], token_chars, &lastpos)) != NULL) {
    934933            switch (get_dsf_mount_list(token, &mounted_on_dsf, &not_mounted_on_dsf)) {
    935934            /* It's a dsf but not a whole disk dsf */
     
    12381237        paranoid_free(tmp1);
    12391238        lastpos = 0;
    1240         while (token = mr_strtok(flag_val['E'], token_chars, &lastpos)) {
     1239        while ((token = mr_strtok(flag_val['E'], token_chars, &lastpos)) != NULL) {
    12411240            switch (get_dsf_mount_list(token, &mounted_on_dsf, &not_mounted_on_dsf)) {
    12421241            case 1:
  • branches/2.2.8/mondo/src/common/libmondo-files-EXT.h

    r1647 r2053  
    2525extern long noof_lines_that_match_wildcard(char *filelist_fname,
    2626                                           char *wildcard);
    27 extern void register_pid(pid_t pid, char *name_str);
    2827extern long long space_occupied_by_cd(char *mountpt);
    2928extern int whine_if_not_found(char *fname);
  • branches/2.2.8/mondo/src/common/libmondo-files.c

    r2048 r2053  
    1 /* libmondo-files.c                                  file manipulation
     1/* file manipulation
    22   $Id$
    3 .
    4 
    5 
    6 04/16/04
    7 - find_home_of_exe() really does return NULL now if file not found
    8 
    9 03/22/04
    10 - added mode_of_file()
    11 
    12 10/02/03
    13 - cleaned up grab_percentage_from_last_line_of_file()
    14 
    15 09/18
    16 - added int make_grub_install_scriptlet()
    17 
    18 09/16
    19 - cleaned up mkisofs feedback window
    20 
    21 09/12
    22 - fixed Teuton-hostile bug in size_of_all_biggiefiles_K()
    23 
    24 09/05
    25 - added size_of_partition_in_mountlist_K()
    26 - size_of_all_biggiefiles_K() now calls get_phys_size_of_drive(fname)
    27 
    28 07/02
    29 - fixed calls to popup_and_get_string()
    30 
    31 05/19
    32 - added CP_BIN
    33 
    34 05/05
    35 - added Joshua Oreman's FreeBSD patches
    36 
    37 05/04
    38 - find_home_of_exe() now returns NULL if file not found
    39 
    40 04/26
    41 - if >4 media est'd, say one meeeellion
    42 
    43 04/25
    44 - fixed minor bug in find_home_of_exe()
    45 
    46 04/24
    47 - added lots of assert()'s and log_OS_error()'s
    48 
    49 04/07
    50 - fix find_home_of_exe()
    51 - cleaned up code a bit
    52 
    53 03/27
    54 - copy_mondo_and_mindi_stuff --- if _homedir_/payload.tgz exists then untar it to CD
    55 
    56 01/14/2003
    57 - if backup media type == nfs then don't estimate no. of media reqd
    58 
    59 11/25/2002
    60 - don't log/echo estimated # of media required if >=50
    61 
    62 10/01 - 11/09
    63 - chmod uses 0x, not decimal :)
    64 - added is_this_file_compressed()
    65 - replace convoluted grep with wc (KP)
    66 
    67 09/01 - 09/30
    68 - only show "number of media" estimate if no -x
    69 - run_program_and_log_output() now takes boolean operator to specify
    70   whether it will log its activities in the event of _success_
    71 
    72 08/01 - 08/31
    73 - handle unknown media sizes
    74 - cleaned up some log_it() calls
    75 
    76 07/24
    77 - created
    783*/
    794
  • branches/2.2.8/mondo/src/common/libmondo-files.h

    r1647 r2053  
    2727                                  char *cklist_fname);
    2828long noof_lines_that_match_wildcard(char *filelist_fname, char *wildcard);
    29 void register_pid(pid_t pid, char *name_str);
    3029long size_of_all_biggiefiles_K();
    3130long long space_occupied_by_cd(char *mountpt);
  • branches/2.2.8/mondo/src/common/newt-specific.c

    r2030 r2053  
    363363        }
    364364        printf("Mondo has aborted.\n");
    365         register_pid(0, "mondo");   // finish() does this too, FYI
    366365        if (!g_main_pid) {
    367366            log_msg(3, "FYI - g_main_pid is blank");
     
    388387        /* newtPopHelpLine(); */
    389388
    390         register_pid(0, "mondo");
    391389        chdir("/");
    392390        run_program_and_log_output("umount " MNT_CDROM, FALSE);
  • branches/2.2.8/mondo/src/mondoarchive/mondoarchive.c

    r2030 r2053  
    3939extern void set_signals(int);
    4040extern int g_current_media_number;
    41 extern void register_pid(pid_t, char *);
    4241extern int g_currentY;
    4342extern bool g_text_mode;
     
    241240    log_msg(9, "This");
    242241
    243     register_pid(g_main_pid, "mondo");
    244242    set_signals(TRUE);          // catch SIGTERM, etc.
    245243    run_program_and_log_output("dmesg -n1", TRUE);
     
    448446    }
    449447    distro_specific_kludges_at_end_of_mondoarchive();
    450     register_pid(0, "mondo");
    451448    set_signals(FALSE);
    452449
  • branches/2.2.8/mondo/src/mondorestore/mondorestore.c

    r2048 r2053  
    28532853    g_main_pid = getpid();
    28542854    srandom((int) (time(NULL)));
    2855     register_pid(getpid(), "mondo");
    28562855    set_signals(TRUE);
    28572856    g_kernel_version = get_kernel_version();
Note: See TracChangeset for help on using the changeset viewer.