Ignore:
Timestamp:
Jan 28, 2007, 7:04:41 PM (12 years ago)
Author:
bruno
Message:
  • Fix mindi install messages (reported by Andree Leidenfrost)
  • remove paranoid_free/free for mr_free
  • mr_asprintf used everywhere
  • mr_malloc used everywhere
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/mondoarchive/mondo-cli.c

    r1067 r1080  
    11/***************************************************************************
    2 mondo-cli.c
    3 -------------------
    4 begin                : Fri Apr 19 16:40:35 EDT 2002
    5 copyright        : (C) 2002 Mondo  Hugo Rabson
    6 email                : Hugo Rabson <hugorabson@msn.com>
    7 edited by            : by Stan Benoit 4/2002
    8 email                : troff@nakedsoul.org
    9 cvsid                : $Id$
    10  ***************************************************************************/
    11 
    12 /***************************************************************************
    13  *                                                                         *
    14  *   This program is free software; you can redistribute it and/or modify  *
    15  *   it under the terms of the GNU General Public License as published by  *
    16  *   the Free Software Foundation; either version 2 of the License, or     *
    17  *   (at your option) any later version.                                   *
    18  *                                                                         *
    19  ***************************************************************************/
    20 
    21 /***************************************************************************
    22 UPDATE LOG
    23 
    24 
    25 08/04
    26 - if user specifies a dumb -T value, abort
    27 
    28 07/22
    29 - handle -Q sensibly (don't abort if only -Q supplied)
    30 
    31 07/17
    32 - better checking of NFS dir's validity
    33 
    34 06/19
    35 - added AUX_VER
    36 
    37 04/17
    38 - added '-b' support
    39 04/03
    40 - added star support
    41 
    42 02/06
    43 - fixed "Please give /dev entry" error msg
    44 
    45 01/20/2004
    46 - added 2.6.x-kernel "device = /dev/...." support to param reader
    47 - better handling of SCSI and /dev entries
    48 - touch /boot/boot.b if necessary
    49 
    50 09/26/2003
    51 - typo in command-line handling of 'r'
    52 
    53 09/25
    54 - added DVD write support
    55 
    56 09/24
    57 - if tape backup (-t) but user doesn't specify tape drive then
    58   make an educated guess using find_tape_device_and_size()
    59 
    60 09/18
    61 - insist on partimagehack being present if -x found
    62 
    63 09/16
    64 - added support for multiple -I's and -E's in call to mondoarchive
    65 - the '-D' flag doesn't take a value now
    66 
    67 07/14
    68 - fatal error if -E too short
    69 
    70 05/14
    71 - if 'n' and user doesn't have rights to write to output dir
    72   then error out
    73 
    74 05/05
    75 - added Joshua Oreman's FreeBSD patches
    76 
    77 05/04
    78 - added Herman Kuster's multi-level bkp patch
    79 
    80 05/02
    81 - write errors to screen, not just to log
    82 
    83 04/25
    84 - added lots of assert()'s and log_OS_error()'s
    85 
    86 04/21
    87 - line 570 --- resolve boot device if softlink
    88 
    89 04/08
    90 - changed a bunch of fprintf(stderr,...)'s to log_it()'s
    91 - fixed final / removal in retrieve_switches_from_command_line()
    92 
    93 04/04
    94 - added -e
    95 
    96 03/15
    97 - reject relative paths if -d flag (Alessandro Polverini)
    98 
    99 01/02/2003
    100 - added -J flag (to let user specify incoming filelist)
    101 
    102 12/13/2002
    103 - various strcpy() calls replaced with strncpy() calls
    104 
    105 12/10
    106 - added g_loglevel
    107 
    108 11/25
    109 - line 614 --- if commmand-line param ends in '/' then drop that '/'
    110 
    111 11/19
    112 - rewrote finish() to kill processes more softly
    113 - if user calls with '-l RAW' then
    114 
    115 09/01 - 09/30
    116 - added -N to let user exclude all NFS-related mounts and devices
    117 - run_program_and_log_output() now takes boolean operator to specify
    118   whether it will log its activities in the event of _success_
    119 
    120 08/01 - 08/31
    121 - if no device specified when backing up to tape streamer then assume /dev/st0
    122 - abort if tape user specifies tape size (just for testing porpoises)
    123 - tape users no longer need to specify tape size
    124 - added some comments
    125 - added bkpinfo->backup_media_type
    126 - renamed from mondo-archive.c to mondo-cli.c
    127 
    128 07/01 - 07/31
    129 - better check for mkfs.vfat
    130 - more sanity-checking for -d flag
    131 - if isodir does not exist then abort
    132 - removed "the rest are..." comment from log
    133 - do not permit '-H' and '-t' in the same command line
    134 - if not '-o' then insist on vfat-friendly kernel
    135 
    136 06/01 - 06/30
    137 - added signal-trapping
    138 - added '-W' (won't make bootable CD or floppies) flag
    139 - added missing 'j++' to -s switch's code
    140 - expanded -s switch
    141 - added -u switch
    142 - if dvdrecord exists and cdrecord doesn't then use
    143   dvdrecord instead of cdrecord
    144 
    145 04/01 - 04/30
    146 - if CD-ROM is supermounted then unmount, run, and remount
    147 - replace MONDO_VERSION #define with VERSION from ../config.h
    148 - if CD-ROM is mounted at start then abort
    149 - improved homedir-locating code
    150 - improved "backup will occupy N CD's" calculation a bit
    151 - added -m (manual CD tray) flag
    152 
    153 
     2$Id$
    1543*******************************************************************/
    1554
     
    16615#include "mondo-cli-EXT.h"
    16716#include "../common/libmondo.h"
     17#include "mr_mem.h"
    16818
    16919//static char cvsid[] = "$Id$";
     
    282132        store_nfs_config(bkpinfo);
    283133    }
    284     paranoid_free(tmp);
     134    mr_free(tmp);
    285135    return (retval);
    286136}
     
    440290            strcat(bkpinfo->include_paths, " ");
    441291        }
    442         asprintf(&tmp1, flag_val['I']);
     292        mr_asprintf(&tmp1, flag_val['I']);
    443293        p = tmp1;
    444294        q = tmp1;
     
    462312            }
    463313        }
    464         paranoid_free(tmp1);
     314        mr_free(tmp1);
    465315
    466316        strncpy(bkpinfo->include_paths + strlen(bkpinfo->include_paths),
     
    684534    if (flag_set['z']) {
    685535        if (find_home_of_exe("getfattr")) {
    686             asprintf(&g_getfattr,"getfattr");
     536            mr_asprintf(&g_getfattr,"getfattr");
    687537        }
    688538        if (find_home_of_exe("getfacl")) {
    689             asprintf(&g_getfacl,"getfacl");
     539            mr_asprintf(&g_getfacl,"getfacl");
    690540        }
    691541    }
     
    700550            strcat(bkpinfo->exclude_paths, " ");
    701551        }
    702         asprintf(&tmp1, flag_val['E']);
     552        mr_asprintf(&tmp1, flag_val['E']);
    703553        p = tmp1;
    704554        q = tmp1;
     
    728578            }
    729579        }
    730         paranoid_free(tmp1);
     580        mr_free(tmp1);
    731581
    732582        strncpy(bkpinfo->exclude_paths + strlen(bkpinfo->exclude_paths),
     
    1005855/* and finally... */
    1006856
    1007     paranoid_free(tmp);
    1008     paranoid_free(psz);
     857    mr_free(tmp);
     858    mr_free(psz);
    1009859    return (retval);
    1010860}
Note: See TracChangeset for help on using the changeset viewer.