Changeset 3855 in MondoRescue


Ignore:
Timestamp:
Mar 6, 2024, 3:43:29 AM (3 months ago)
Author:
Bruno Cornec
Message:

Fix save_disklist_to_file and resolve_naff_tokens protos

Location:
branches/3.3/mondo/src/common
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/mondo/src/common/libmondo-fork.c

    r3849 r3855  
    1111#include "mr_sys.h"
    1212#include "mondostructures.h"
    13 #include "libmondo-fork.h"
    1413#include "libmondo-string-EXT.h"
    1514#include "libmondo-gui-EXT.h"
  • branches/3.3/mondo/src/common/libmondo-raid-EXT.h

    r2982 r3855  
    2727                                 FILE * fout);
    2828
    29 extern void
    30 save_disklist_to_file(char *listname,
    31                       struct list_of_disks *disklist, FILE * fout);
    32 
    33 
    3429#ifdef __FreeBSD__
    3530extern void add_disk_to_raid_device(struct vinum_plex *p,
  • branches/3.3/mondo/src/common/libmondo-raid.c

    r3614 r3855  
    320320}
    321321
     322
     323/**
     324 * Save a disklist to a stream in raidtab format.
     325 * @param listname One of "raid-disk", "spare-disk", "parity-disk", or "failed-disk".
     326 * @param disklist The disklist to save to @p fout.
     327 * @param fout The stream to write to.
     328 */
     329void save_disklist_to_file(const char *listname, struct list_of_disks *disklist, FILE * fout)
     330{
     331    int i;
     332
     333    assert_string_is_neither_NULL_nor_zerolength(listname);
     334    assert(disklist != NULL);
     335    assert(fout != NULL);
     336
     337    for (i = 0; i < disklist->entries; i++) {
     338        fprintf(fout, "    device                %s\n", disklist->el[i].device);
     339        fprintf(fout, "    %-21s %d\n", listname, disklist->el[i].index);
     340    }
     341}
    322342
    323343/**
     
    732752}
    733753#endif
    734 
    735 
    736 /**
    737  * Save a disklist to a stream in raidtab format.
    738  * @param listname One of "raid-disk", "spare-disk", "parity-disk", or "failed-disk".
    739  * @param disklist The disklist to save to @p fout.
    740  * @param fout The stream to write to.
    741  */
    742 void
    743 save_disklist_to_file(char *listname, struct list_of_disks *disklist, FILE * fout)
    744 {
    745     int i;
    746 
    747     assert_string_is_neither_NULL_nor_zerolength(listname);
    748     assert(disklist != NULL);
    749     assert(fout != NULL);
    750 
    751     for (i = 0; i < disklist->entries; i++) {
    752         fprintf(fout, "    device                %s\n", disklist->el[i].device);
    753         fprintf(fout, "    %-21s %d\n", listname, disklist->el[i].index);
    754     }
    755 }
    756 
    757 
    758 
    759754
    760755
  • branches/3.3/mondo/src/common/libmondo-raid.h

    r2982 r3855  
    2222                             char *fname);
    2323void save_raidrec_to_file(struct raid_device_record *raidrec, FILE * fout);
    24 void
    25 save_disklist_to_file(char *listname,
    26                       struct list_of_disks *disklist, FILE * fout);
    2724#ifdef __FreeBSD__
    2825void add_disk_to_raid_device(struct vinum_plex *p, char *device_to_add);
  • branches/3.3/mondo/src/common/libmondo-string-EXT.h

    r3552 r3855  
    1717extern char *number_to_text(int i);
    1818extern void resolve_naff_tokens(char *output, char *ip, char *value,
    19                                 char *token);
     19                                const char *token);
    2020extern char *slice_fname(long bigfileno, long sliceno, char *path,
    2121                         char *s);
Note: See TracChangeset for help on using the changeset viewer.