Changeset 2334 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-raid.c
- Timestamp:
- Aug 18, 2009, 5:28:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-raid.c
r2324 r2334 334 334 #ifdef __FreeBSD__ 335 335 int i, j; 336 char *org = NULL; 336 337 337 338 fprintf(fout, "\nvolume %s\n", raidrec->volname); 338 339 for (i = 0; i < raidrec->plexes; ++i) { 339 char org[24];340 340 switch (raidrec->plex[i].raidlevel) { 341 341 case -1: 342 strcpy(org, "concat");342 mr_asprintf(org, "concat"); 343 343 break; 344 344 case 0: 345 strcpy(org, "striped");345 mr_asprintf(org, "striped"); 346 346 break; 347 347 case 5: 348 strcpy(org, "raid5");348 mr_asprintf(org, "raid5"); 349 349 break; 350 350 } 351 351 fprintf(fout, " plex org %s", org); 352 mr_free(org); 353 352 354 if (raidrec->plex[i].raidlevel != -1) { 353 355 fprintf(fout, " %ik", raidrec->plex[i].stripesize); … … 356 358 357 359 for (j = 0; j < raidrec->plex[i].subdisks; ++j) { 358 fprintf(fout, " sd drive %s size 0\n", 359 raidrec->plex[i].sd[j].which_device); 360 fprintf(fout, " sd drive %s size 0\n", raidrec->plex[i].sd[j].which_device); 360 361 } 361 362 } … … 501 502 502 503 if (get_option_state(argc, argv, "hotspare")) { 503 strcpy(raidlist->spares.el[raidlist->spares.entries].name, 504 drivename); 505 strcpy(raidlist->spares.el[raidlist->spares.entries]. 506 device, devname); 504 strcpy(raidlist->spares.el[raidlist->spares.entries].name, drivename); 505 strcpy(raidlist->spares.el[raidlist->spares.entries]. device, devname); 507 506 raidlist->spares.el[raidlist->spares.entries].index = 508 507 raidlist->disks.entries; 509 508 raidlist->spares.entries++; 510 509 } else { 511 strcpy(raidlist->disks.el[raidlist->disks.entries].name, 512 drivename); 513 strcpy(raidlist->disks.el[raidlist->disks.entries].device, 514 devname); 510 strcpy(raidlist->disks.el[raidlist->disks.entries].name, drivename); 511 strcpy(raidlist->disks.el[raidlist->disks.entries].device, devname); 515 512 raidlist->disks.el[raidlist->disks.entries].index = 516 513 raidlist->disks.entries;
Note:
See TracChangeset
for help on using the changeset viewer.