summaryrefslogtreecommitdiffstats
path: root/libdm
diff options
context:
space:
mode:
authorMilan Broz <mbroz@redhat.com>2010-06-16 13:01:25 +0000
committerMilan Broz <mbroz@redhat.com>2010-06-16 13:01:25 +0000
commitc9c7d25c35fce40035524bad972496c3783a6e8c (patch)
treec6afe453fb18c361ba0d7dc8ca07284b442f8ea4 /libdm
parentcee2f123a4db200cd5fb96f3c980716e2f1ffd97 (diff)
downloadlvm2-c9c7d25c35fce40035524bad972496c3783a6e8c.tar.gz
lvm2-c9c7d25c35fce40035524bad972496c3783a6e8c.tar.xz
lvm2-c9c7d25c35fce40035524bad972496c3783a6e8c.zip
Remove C++ private keyword from headers.
Add extern C definition for libdevmapper, lvm2app and lvm2cmd.
Diffstat (limited to 'libdm')
-rw-r--r--libdm/libdevmapper.h13
-rw-r--r--libdm/libdm-report.c4
2 files changed, 12 insertions, 5 deletions
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index 0b67a0f1..7c72cf77 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved.
*
* This file is part of the device-mapper userspace tools.
*
@@ -29,6 +29,10 @@
#include <stdlib.h>
#include <stdio.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*****************************************************************
* The first section of this file provides direct access to the
* individual device-mapper ioctls. Since it is quite laborious to
@@ -1022,7 +1026,7 @@ struct dm_report_field_type {
const char heading[32]; /* string printed in header */
int (*report_fn)(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field, const void *data,
- void *private);
+ void *private_data);
const char *desc; /* description of the field */
};
@@ -1044,7 +1048,7 @@ struct dm_report *dm_report_init(uint32_t *report_types,
const char *output_separator,
uint32_t output_flags,
const char *sort_keys,
- void *private);
+ void *private_data);
int dm_report_object(struct dm_report *rh, void *object);
int dm_report_output(struct dm_report *rh);
void dm_report_free(struct dm_report *rh);
@@ -1163,4 +1167,7 @@ int dm_udev_wait(uint32_t cookie);
#define DM_DEV_DIR_UMASK 0022
+#ifdef __cplusplus
+}
+#endif
#endif /* LIB_DEVICE_MAPPER_H */
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c
index e13115a7..2b044b53 100644
--- a/libdm/libdm-report.c
+++ b/libdm/libdm-report.c
@@ -566,7 +566,7 @@ struct dm_report *dm_report_init(uint32_t *report_types,
const char *output_separator,
uint32_t output_flags,
const char *sort_keys,
- void *private)
+ void *private_data)
{
struct dm_report *rh;
const struct dm_report_object_type *type;
@@ -588,7 +588,7 @@ struct dm_report *dm_report_init(uint32_t *report_types,
rh->separator = output_separator;
rh->fields = fields;
rh->types = types;
- rh->private = private;
+ rh->private = private_data;
rh->flags |= output_flags & DM_REPORT_OUTPUT_MASK;