This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

push pv_segments and pv_segments_num to global variables

  • Loading branch information...
tomato42 committed Aug 5, 2012
1 parent 2e3876c commit 0b6f676ba9235ea0d6800b51241b98cbdcbde420
Showing with 17 additions and 14 deletions.
  1. +0 −14 lvmls.c
  2. +17 −0 lvmls.h
View
14 lvmls.c
@@ -23,20 +23,6 @@
#include <assert.h>
#include "lvmls.h"
-// information about continuous extent allocations
-struct pv_allocations {
- char *pv_name;
- char *vg_name;
- char *vg_format; // not used
- char *vg_attr; // not used
- char *lv_name;
- char *pv_type; // type of allocation ("free", "linear", "striped")
- uint64_t pv_start; // starting extent in PV
- uint64_t pv_length;
- uint64_t lv_start; // starting extent of this segment in LV
-};
-
-// TODO move to program_params
struct pv_allocations *pv_segments=NULL;
size_t pv_segments_num=0;
View
17 lvmls.h
@@ -36,6 +36,23 @@ struct le_info {
const char *lv_name;
};
+// information about continuous extent allocations
+struct pv_allocations {
+ char *pv_name;
+ char *vg_name;
+ char *vg_format; // not used
+ char *vg_attr; // not used
+ char *lv_name;
+ char *pv_type; // type of allocation ("free", "linear", "striped")
+ uint64_t pv_start; // starting extent in PV
+ uint64_t pv_length;
+ uint64_t lv_start; // starting extent of this segment in LV
+};
+
+// TODO move to program_params
+extern struct pv_allocations *pv_segments;
+extern size_t pv_segments_num;
+
void pv_info_free(struct pv_info *pv);
// convert logical extent from logical volume specified by lv_name,

0 comments on commit 0b6f676

Please sign in to comment.