Ignore:
Timestamp:
Oct 11, 2005, 1:34:31 AM (14 years ago)
Author:
bcornec
Message:

Trunk: indent on all source files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/mondo/common/mondostructures.h

    r58 r59  
    3535 * There is one mountlist_line for each device we're keeping track of in the mountlist.
    3636 */
    37 struct mountlist_line
    38 {
     37struct mountlist_line {
    3938  /**
    4039   * The name of the device (/dev entry) for this mountlist line. Guaranteed to be unique.
    4140   */
    42   char device[64];
     41    char device[64];
    4342
    4443  /**
     
    4645   * This can be "raid", for a RAID subdisk, or "lvm", for an LVM PV.
    4746   */
    48   char mountpoint[256];
     47    char mountpoint[256];
    4948
    5049  /**
     
    5251   * Also, this can be "raid", for a RAID subdisk, or "lvm", for an LVM PV.
    5352   */
    54   char format[64];
     53    char format[64];
    5554
    5655  /**
    5756   * The size in kilobytes of this device. 0 or -1 indicates LVM.
    5857   */
    59   long long size;
     58    long long size;
    6059
    6160  /**
    6261   * For ext2 and ext3, this is the filesystem label (if there is one). If not, this should be "".
    6362   */
    64   char label[256];
     63    char label[256];
    6564};
    6665
     
    7069 * system, so we can recreate them in a nuke restore.
    7170 */
    72 struct mountlist_itself
    73 {
     71struct mountlist_itself {
    7472  /**
    7573   * Number of entries in the mountlist.
    7674   */
    77   int entries;
     75    int entries;
    7876
    7977  /**
    8078   * The list of entries, all @p entries of them.
    8179   */
    82   struct mountlist_line el[MAX_TAPECATALOG_ENTRIES];
     80    struct mountlist_line el[MAX_TAPECATALOG_ENTRIES];
    8381};
    8482
     
    8886 * ensure accurate resizing.
    8987 */
    90 struct mountlist_reference
    91 {
     88struct mountlist_reference {
    9289  /**
    9390   * The number of entries in the list of mountlist references.
    9491   */
    95   int entries;
     92    int entries;
    9693
    9794  /**
    9895   * The array of mountlist_line, allocated on demand.
    9996   */
    100   struct mountlist_line **el;
     97    struct mountlist_line **el;
    10198};
    10299
     
    104101 * A line in @p additional_raid_variables.
    105102 */
    106 struct raid_var_line
    107 {
     103struct raid_var_line {
    108104  /**
    109105   * The label for this RAID variable.
    110106   */
    111   char label[64];
     107    char label[64];
    112108
    113109  /**
    114110   * The value for this RAID variable.
    115111   */
    116   char value[64];
     112    char value[64];
    117113};
    118114
     
    123119 * Each @p raid_device_record has one.
    124120 */
    125 struct additional_raid_variables
    126 {
     121struct additional_raid_variables {
    127122  /**
    128123   * The number of entries in the list.
    129124   */
    130   int entries;
     125    int entries;
    131126
    132127  /**
    133128   * The list of entries, all @p entries of them.
    134129   */
    135   struct raid_var_line el[MAXIMUM_ADDITIONAL_RAID_VARS];
     130    struct raid_var_line el[MAXIMUM_ADDITIONAL_RAID_VARS];
    136131};
    137132
     
    139134 * One disk in a @p list_of_disks.
    140135 */
    141 struct s_disk
    142 {
     136struct s_disk {
    143137#ifdef __FreeBSD__
    144     /**
     138    /**
    145139     * The name of this disk. If blank it will eventually get filled in automatically.
    146140     */
    147     char name[64];
     141    char name[64];
    148142#endif
    149143  /**
    150144   * The device this entry describes.
    151145   */
    152   char device[64];
     146    char device[64];
    153147
    154148  /**
    155149   * Index number of this entry in the whole disklist.
    156150   */
    157   int index;
     151    int index;
    158152};
    159153
     
    161155 * A list of @p s_disk. Every @p raid_device_record has four.
    162156 */
    163 struct list_of_disks
    164 {
     157struct list_of_disks {
    165158  /**
    166159   * The number of entries in the disklist.
    167160   */
    168   int entries;
     161    int entries;
    169162
    170163  /**
    171164   * The entries themselves, all @p entries of them.
    172165   */
    173   struct s_disk el[MAXIMUM_DISKS_PER_RAID_DEV];
     166    struct s_disk el[MAXIMUM_DISKS_PER_RAID_DEV];
    174167};
    175168
     
    177170 * A type of media we're backing up to.
    178171 */
    179 typedef enum { none=0,      ///< No type has been set yet.
    180            iso,     ///< Back up to ISO images.
    181            cdr,     ///< Back up to recordable CDs (do not erase them).
    182            cdrw,        ///< Back up to CD-RWs and blank them first.
    183            dvd,     ///< Back up to DVD+R[W] or DVD-R[W] disks.
    184            cdstream,    ///< Back up to recordable CDs but treat them like a tape streamer.
    185            nfs,     ///< Back up to an NFS mount on the local subnet.
    186            tape,        ///< Back up to tapes.
    187            udev     ///< Back up to another unsupported device; just send a stream of bytes.
    188              } t_bkptype;
     172typedef enum { none = 0,        ///< No type has been set yet.
     173    iso,                        ///< Back up to ISO images.
     174    cdr,                        ///< Back up to recordable CDs (do not erase them).
     175    cdrw,                       ///< Back up to CD-RWs and blank them first.
     176    dvd,                        ///< Back up to DVD+R[W] or DVD-R[W] disks.
     177    cdstream,                   ///< Back up to recordable CDs but treat them like a tape streamer.
     178    nfs,                        ///< Back up to an NFS mount on the local subnet.
     179    tape,                       ///< Back up to tapes.
     180    udev                        ///< Back up to another unsupported device; just send a stream of bytes.
     181} t_bkptype;
    189182
    190183/**
    191184 * A type of file in the catalog of recent archives.
    192185 */
    193 typedef enum { other,       ///< Some other kind of file.
    194            fileset,     ///< An afioball (fileset), optionally compressed.
    195            biggieslice  ///< A slice of a biggiefile, optionally compressed.
    196              } t_archtype;
     186typedef enum { other,           ///< Some other kind of file.
     187    fileset,                    ///< An afioball (fileset), optionally compressed.
     188    biggieslice                 ///< A slice of a biggiefile, optionally compressed.
     189} t_archtype;
    197190
    198191
    199192#ifdef __FreeBSD__
    200193
    201     struct vinum_subdisk
    202     {
    203         char which_device[64];
    204     };
    205 
    206     struct vinum_plex
    207     {
    208         int raidlevel;
    209         int stripesize;
    210         int subdisks;
    211         struct vinum_subdisk sd[MAXIMUM_RAID_DEVS];
    212     };
    213    
    214     struct vinum_volume
    215     {
    216         char volname[64];
    217         int plexes;
    218         struct vinum_plex plex[9];
    219     };
    220    
    221     struct raidlist_itself
    222     {
    223         int entries;
    224         struct list_of_disks spares;
    225         struct list_of_disks disks;
    226         struct vinum_volume el[MAXIMUM_RAID_DEVS];
    227     };
    228    
     194struct vinum_subdisk {
     195    char which_device[64];
     196};
     197
     198struct vinum_plex {
     199    int raidlevel;
     200    int stripesize;
     201    int subdisks;
     202    struct vinum_subdisk sd[MAXIMUM_RAID_DEVS];
     203};
     204
     205struct vinum_volume {
     206    char volname[64];
     207    int plexes;
     208    struct vinum_plex plex[9];
     209};
     210
     211struct raidlist_itself {
     212    int entries;
     213    struct list_of_disks spares;
     214    struct list_of_disks disks;
     215    struct vinum_volume el[MAXIMUM_RAID_DEVS];
     216};
     217
    229218#else
    230219
    231         /**
     220        /**
    232221         * A RAID device in the raidlist.
    233222         */
    234     struct raid_device_record
    235     {
     223struct raid_device_record {
    236224      /**
    237225       * The name of the RAID device (e.g. /dev/md0).
    238226       */
    239       char raid_device[64];
     227    char raid_device[64];
    240228
    241229      /**
    242230       * The RAID level (-1 to 5) we're using.
    243231       */
    244       int raid_level;
     232    int raid_level;
    245233
    246234      /**
    247235       * Whether the disk has a persistent superblock.
    248236       */
    249       int persistent_superblock;
     237    int persistent_superblock;
    250238
    251239      /**
    252240       * The chunk size of this RAID device.
    253241       */
    254       int chunk_size;
     242    int chunk_size;
    255243
    256244      /**
    257245       * A list of the disks to use for storing data.
    258246       */
    259       struct list_of_disks data_disks;
     247    struct list_of_disks data_disks;
    260248
    261249      /**
    262250       * A list of the disks to use as "hot spares" in case one dies.
    263251       */
    264       struct list_of_disks spare_disks;
     252    struct list_of_disks spare_disks;
    265253
    266254      /**
    267255       * A list of the disks to use for storing parity information.
    268256       */
    269       struct list_of_disks parity_disks;
     257    struct list_of_disks parity_disks;
    270258
    271259      /**
    272260       * A list of the disks in this RAID device that have failed\. Rare.
    273261       */
    274       struct list_of_disks failed_disks;
     262    struct list_of_disks failed_disks;
    275263
    276264      /**
    277265       * The additional RAID variables for this device.
    278266       */
    279       struct additional_raid_variables additional_vars;
    280     };
    281 
    282         /**
     267    struct additional_raid_variables additional_vars;
     268};
     269
     270        /**
    283271         * The list of RAID devices.
    284272         * This is intended to be used along with the mountlist, and it can be
    285273         * directly loaded from/saved to raidtab format.
    286274         */
    287     struct raidlist_itself
    288     {
     275struct raidlist_itself {
    289276      /**
    290277       * The number of entries in the list.
    291278       */
    292       int entries;
     279    int entries;
    293280
    294281      /**
    295282       * The RAID devices in the raidlist, all @p entries of them.
    296283       */
    297       struct raid_device_record el[MAXIMUM_RAID_DEVS];
    298     };
     284    struct raid_device_record el[MAXIMUM_RAID_DEVS];
     285};
    299286
    300287#endif
     
    316303 * extremely strange and hard-to-track errors in chop_filelist(), since optimal_set_size is 0.
    317304 */
    318 struct s_bkpinfo
    319 {
     305struct s_bkpinfo {
    320306  /**
    321307   * The device we're backing up to.
     
    324310   * If backup_media_type is anything else, this should be blank.
    325311   */
    326   char media_device[MAX_STR_LEN/4];
     312    char media_device[MAX_STR_LEN / 4];
    327313
    328314  /**
     
    333319   * @bug This should probably be only one variable, not an array.
    334320   */
    335   long media_size[MAX_NOOF_MEDIA+1];
     321    long media_size[MAX_NOOF_MEDIA + 1];
    336322
    337323  /**
     
    347333   * The function which_boot_loader() can help you set this.
    348334   */
    349   char boot_loader;
     335    char boot_loader;
    350336
    351337  /**
     
    354340   * to take truncate_to_drive_name() of where_is_root_mounted().
    355341   */
    356   char boot_device[MAX_STR_LEN/4];
     342    char boot_device[MAX_STR_LEN / 4];
    357343
    358344  /**
     
    361347   * compression_level is 0.
    362348   */
    363   char zip_exe[MAX_STR_LEN/4];
     349    char zip_exe[MAX_STR_LEN / 4];
    364350
    365351  /**
     
    367353   * bz2, gzip uses gz, etc. Do not include the dot.
    368354   */
    369   char zip_suffix[MAX_STR_LEN/4];
     355    char zip_suffix[MAX_STR_LEN / 4];
    370356
    371357  /**
     
    382368   * This is a useful feature, but use at your own risk.
    383369   */
    384   char image_devs[MAX_STR_LEN/4];
     370    char image_devs[MAX_STR_LEN / 4];
    385371
    386372  /**
    387373   * The compression level (1-9) to use. 0 disables compression.
    388374   */
    389   int compression_level;
     375    int compression_level;
    390376
    391377  /**
     
    395381   * and @p zip_suffix.
    396382   */
    397   bool use_lzo;
     383    bool use_lzo;
    398384
    399385  /**
     
    403389   * will be recompressed again.
    404390   */
    405   char do_not_compress_these[MAX_STR_LEN/2];
     391    char do_not_compress_these[MAX_STR_LEN / 2];
    406392
    407393  /**
    408394   * If TRUE, then we should verify a backup.
    409395   */
    410   bool verify_data;
     396    bool verify_data;
    411397
    412398  /**
    413399   * If TRUE, then we should back up some data.
    414400   */
    415   bool backup_data;
     401    bool backup_data;
    416402
    417403  /**
    418404   * If TRUE, then we should restore some data.
    419405   */
    420   bool restore_data;
    421 
    422  
     406    bool restore_data;
     407
     408
    423409  /**
    424410    * If TRUE, then we should backup/restore using star, not afio
    425411   */
    426    bool use_star;
    427    
     412    bool use_star;
     413
    428414
    429415  /**
    430416   * Size of internal block reads/writes
    431417   */
    432   long internal_tape_block_size;
    433    
     418    long internal_tape_block_size;
     419
    434420  /**
    435421   * If TRUE, we're making a CD that will autonuke without confirmation when booted.
    436422   */
    437   bool disaster_recovery;
     423    bool disaster_recovery;
    438424
    439425  /**
     
    442428   * If backup_media_type is anything else, this is ignored.
    443429   */
    444   char isodir[MAX_STR_LEN/4];
     430    char isodir[MAX_STR_LEN / 4];
    445431
    446432/**
     
    449435   * If backup_media_type is anything else, this is ignored.
    450436   */
    451   char prefix[MAX_STR_LEN/4];
     437    char prefix[MAX_STR_LEN / 4];
    452438
    453439  /**
     
    456442   * As such, it needs to be at least as large as the largest CD/DVD/ISO.
    457443   */
    458   char scratchdir[MAX_STR_LEN/4];
     444    char scratchdir[MAX_STR_LEN / 4];
    459445
    460446  /**
     
    464450   * of space here.
    465451   */
    466   char tmpdir[MAX_STR_LEN/4];
     452    char tmpdir[MAX_STR_LEN / 4];
    467453
    468454  /**
     
    471457   * needn't set it yourself.
    472458   */
    473   long optimal_set_size;
     459    long optimal_set_size;
    474460
    475461  /**
    476462   * The type of media we're backing up to.
    477463   */
    478   t_bkptype backup_media_type;
     464    t_bkptype backup_media_type;
    479465//  bool blank_dvd_first;
    480466
     
    484470   * If FALSE, then we use the filelist whose name is specified in @p include_paths.
    485471   */
    486   bool make_filelist;
     472    bool make_filelist;
    487473
    488474  /**
     
    491477   * If you do nothing, "/" will be used.
    492478   */
    493   char include_paths[MAX_STR_LEN];
     479    char include_paths[MAX_STR_LEN];
    494480
    495481  /**
     
    498484   * the scratchdir, and the tempdir are automatically excluded.
    499485   */
    500   char exclude_paths[MAX_STR_LEN];
     486    char exclude_paths[MAX_STR_LEN];
    501487
    502488  /**
     
    505491   * without overwriting the old ones. Ignored during a backup.
    506492   */
    507   char restore_path[MAX_STR_LEN];
     493    char restore_path[MAX_STR_LEN];
    508494
    509495  /**
    510496   * A command to call BEFORE making an ISO image.
    511497   */
    512   char call_before_iso[MAX_STR_LEN];
     498    char call_before_iso[MAX_STR_LEN];
    513499
    514500  /**
    515501   * A command to call to make an ISO image.
    516502   */
    517   char call_make_iso[MAX_STR_LEN];
     503    char call_make_iso[MAX_STR_LEN];
    518504
    519505  /**
    520506   * A command to call to burn the ISO image.
    521507   */
    522   char call_burn_iso[MAX_STR_LEN];
     508    char call_burn_iso[MAX_STR_LEN];
    523509
    524510  /**
    525511   * A command to call AFTER making an ISO image.
    526512   */
    527   char call_after_iso[MAX_STR_LEN];
     513    char call_after_iso[MAX_STR_LEN];
    528514
    529515  /**
     
    531517   * included with Mindi.
    532518   */
    533   char kernel_path[MAX_STR_LEN];
     519    char kernel_path[MAX_STR_LEN];
    534520
    535521  /**
     
    539525   * address form. (Domain names will be resolved in post_param_configuration().)
    540526   */
    541   char nfs_mount[MAX_STR_LEN];
     527    char nfs_mount[MAX_STR_LEN];
    542528
    543529  /**
     
    545531   * the backups in.
    546532   */
    547   char nfs_remote_dir[MAX_STR_LEN];
     533    char nfs_remote_dir[MAX_STR_LEN];
    548534
    549535  /**
     
    551537   * after nuking the system. If "", do not use a post-nuke tarball.
    552538   */
    553   char postnuke_tarball[MAX_STR_LEN];
     539    char postnuke_tarball[MAX_STR_LEN];
    554540
    555541  /**
     
    557543   * writing to them. This has no effect for DVDs.
    558544   */
    559   bool wipe_media_first;
     545    bool wipe_media_first;
    560546
    561547// patch by Herman Kuster 
     
    564550   * (files changed since last full backup) are supported.
    565551   */
    566   int differential;
     552    int differential;
    567553// end patch 
    568554
     
    570556   * If TRUE, then don't eject media when backing up or restoring.
    571557   */
    572   bool please_dont_eject;
     558    bool please_dont_eject;
    573559
    574560  /**
    575561   * The speed of the CD-R[W] drive.
    576562   */
    577   int cdrw_speed;
     563    int cdrw_speed;
    578564
    579565  /**
     
    582568   * it probably falls into this category.
    583569   */
    584   bool manual_cd_tray;
     570    bool manual_cd_tray;
    585571
    586572  /**
     
    588574   * or so. It is useful in testing. Use with care.
    589575   */
    590   bool nonbootable_backup;
     576    bool nonbootable_backup;
    591577
    592578  /**
    593579   * If TRUE, make the bootable CD use LILO/ELILO. If FALSE, use isolinux (the default).
    594580   */
    595   bool make_cd_use_lilo;
     581    bool make_cd_use_lilo;
    596582};
    597583
     
    603589 * @bug My understanding of this structure is horrendously incomplete. Could you please fill in the details?
    604590 */
    605 struct s_node
    606 {
     591struct s_node {
    607592  /**
    608593   * The character this node contains.
    609594   */
    610   char ch;
     595    char ch;
    611596
    612597  /**
    613598   * The node to the right of this one.
    614599   */
    615   struct s_node *right;
     600    struct s_node *right;
    616601
    617602  /**
    618603   * The node below this one.
    619604   */
    620   struct s_node *down;
     605    struct s_node *down;
    621606
    622607  /**
    623608   * If TRUE, then this node is selected (for restore, for example).
    624609   */
    625   bool selected;
     610    bool selected;
    626611
    627612  /**
    628613   * If TRUE, then we want to see the directories below this one.
    629614   */
    630   bool expanded;
     615    bool expanded;
    631616};
    632617
     
    638623 */
    639624struct s_wrapfifo {
    640         /**
     625        /**
    641626     * The device we write to or read from (a FIFO).
    642627     */
    643     char public_device[MAX_STR_LEN/4];
    644 
    645         /**
     628    char public_device[MAX_STR_LEN / 4];
     629
     630        /**
    646631     * The actual device that data from the FIFO should be buffered and written to.
    647632     */
    648     char private_device[MAX_STR_LEN/4];
    649 
    650         /**
     633    char private_device[MAX_STR_LEN / 4];
     634
     635        /**
    651636     * A buffer for holding data read from the FIFO.
    652637     */
    653     char internal_buffer_IN_fifo[MAX_STR_LEN/4];
    654 
    655         /**
     638    char internal_buffer_IN_fifo[MAX_STR_LEN / 4];
     639
     640        /**
    656641     * A buffer for holding data to be written to the FIFO.
    657642     */
    658     char internal_buffer_OUT_fifo[MAX_STR_LEN/4];
    659 
    660         /**
     643    char internal_buffer_OUT_fifo[MAX_STR_LEN / 4];
     644
     645        /**
    661646     * If TRUE, then we're writing directly to the tape streamer; if FALSE, we're writing to the FIFO.
    662647     */
     
    672657 */
    673658struct s_filename_and_lstat_info {
    674         /**
     659        /**
    675660     * The filename of the file this structure is describing.
    676661     */
    677662    char filename[MAX_STR_LEN];
    678663
    679         /**
     664        /**
    680665     * The MD5 checksum (32 hex digits) of this file.
    681666     */
    682667    char checksum[64];
    683668
    684         /**
     669        /**
    685670     * Unused; kept for backwards compatibility.
    686671     */
    687672    char for_backward_compatibility;
    688673
    689         /**
     674        /**
    690675     * The stat buffer for this file.
    691676     * Generated with a call to <tt>lstat(&(struc->properties))</tt> where @p struc
     
    701686 */
    702687struct s_filelist_entry {
    703         /**
     688        /**
    704689     * The name of the file.
    705690     */
    706691    char filename[MAX_STR_LEN];
    707         /**
     692        /**
    708693     * The severity if the file has changed between the backup and live filesystem.
    709694     * This is on a scale from 1 to 3, 3 being the most important. File patterns which cause
     
    737722     * @see severity_of_difference
    738723     */
    739         int severity;
     724    int severity;
    740725};
    741726
     
    745730 */
    746731struct s_filelist {
    747         /**
     732        /**
    748733     * The number of entries in the list.
    749734     */
    750         int entries;
    751 
    752         /**
     735    int entries;
     736
     737        /**
    753738     * The entries themselves, all @p entries of them.
    754739     */
     
    761746 */
    762747struct s_tapecat_entry {
    763         /**
     748        /**
    764749     * The type of archive it is (afioball, slice, or something else).
    765750     */
    766751    t_archtype type;
    767752
    768         /**
     753        /**
    769754     * The filelist number or biggiefile (not slice!) number.
    770755     */
    771756    int number;
    772757
    773         /**
     758        /**
    774759     * The slice number if it's a biggiefile.
    775760     */
    776761    long aux;
    777762
    778         /**
     763        /**
    779764     * The tape position at the point this entry was added.
    780765     */
    781766    long long tape_posK;
    782767
    783         /**
     768        /**
    784769     * The filename of the file cataloged here.
    785770     */
    786     char fname[MAX_TAPECAT_FNAME_LEN+1];
     771    char fname[MAX_TAPECAT_FNAME_LEN + 1];
    787772};
    788773
     
    792777 */
    793778struct s_tapecatalog {
    794         /**
     779        /**
    795780     * The number of entries in the tape catalog.
    796781     */
    797782    int entries;
    798783
    799         /**
     784        /**
    800785     * The entries themselves, all @p entries of them.
    801786     */
     
    806791
    807792struct s_mdrec {
    808     int md;     // /dev/mdN
    809     int raidlevel;  // 0, 1, 5
     793    int md;                     // /dev/mdN
     794    int raidlevel;              // 0, 1, 5
    810795    struct list_of_disks disks;
    811796    int progress;
     
    816801    struct s_mdrec el[MAXIMUM_RAID_DEVS];
    817802};
    818 
Note: See TracChangeset for help on using the changeset viewer.