~ubuntu-branches/debian/sid/lvm2/sid

« back to all changes in this revision

Viewing changes to lib/unknown/unknown.c

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2014-08-19 15:37:06 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20140819153706-i1gaio8lg534dara
Tags: 2.02.109-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#include "lib.h"
16
16
#include "toolcontext.h"
17
17
#include "segtype.h"
18
 
#include "display.h"
19
18
#include "text_export.h"
20
19
#include "config.h"
21
 
#include "activate.h"
22
20
 
23
21
static const char *_unknown_name(const struct lv_segment *seg)
24
22
{
55
53
        return out_config_node(f, cn);
56
54
}
57
55
 
58
 
#ifdef DEVMAPPER_SUPPORT
59
 
static int _unknown_add_target_line(struct dev_manager *dm __attribute__((unused)),
60
 
                                struct dm_pool *mem __attribute__((unused)),
61
 
                                struct cmd_context *cmd __attribute__((unused)),
62
 
                                void **target_state __attribute__((unused)),
63
 
                                struct lv_segment *seg __attribute__((unused)),
64
 
                                const struct lv_activate_opts *laopts __attribute__((unused)),
65
 
                                struct dm_tree_node *node, uint64_t len,
66
 
                                uint32_t *pvmove_mirror_count __attribute__((unused)))
67
 
{
68
 
        return dm_tree_node_add_error_target(node, len);
69
 
}
70
 
#endif
71
 
 
72
56
static void _unknown_destroy(struct segment_type *segtype)
73
57
{
74
58
        dm_free(segtype);
78
62
        .name = _unknown_name,
79
63
        .text_import = _unknown_text_import,
80
64
        .text_export = _unknown_text_export,
81
 
#ifdef DEVMAPPER_SUPPORT
82
 
        .add_target_line = _unknown_add_target_line,
83
 
#endif
84
65
        .destroy = _unknown_destroy,
85
66
};
86
67
 
95
76
 
96
77
        segtype->cmd = cmd;
97
78
        segtype->ops = &_unknown_ops;
98
 
        segtype->name = dm_pool_strdup(cmd->mem, name);
 
79
        segtype->name = dm_pool_strdup(cmd->libmem, name);
99
80
        segtype->private = NULL;
100
81
        segtype->flags = SEG_UNKNOWN | SEG_VIRTUAL | SEG_CANNOT_BE_ZEROED;
101
82