~psusi/ubuntu/precise/dmraid/fix-gpt

« back to all changes in this revision

Viewing changes to 1.0.0.rc16/lib/mm/dbg_malloc.h

  • Committer: Bazaar Package Importer
  • Author(s): Artur Rona
  • Date: 2010-02-04 21:34:22 UTC
  • mfrom: (1.1.4 upstream) (2.4.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100204213422-tdag8lcxpr7ahmg4
Tags: 1.0.0.rc16-3ubuntu1
* Merge from debian testing. (LP: #503136)  Remaining changes:
  - debian/dmraid-activate: Remove the special-casing of the root
    device which breaks in many situations and leaves the raw devices
    exposed. This was introduced in Debian to accommodate some broken
    configurations which wanted to access "partitions" on the raid
    raw devices. In Ubuntu, broken configurations has not been supported.
  - debian/dmraid.postinst: Comment out "udevadm trigger" call in postinst
    for now as it has severeconsequences when mountall is installed
    (clears /tmp).  If dmraid is installed, then presumably the important
    system devices are up and one canbe bothered with a reboot to take 
    the change into account. Let update-initramfs flag the system
    as needing a reboot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2004,2005  Heinz Mauelshagen, Red Hat GmbH.
 
3
 *                          All rights reserved.
 
4
 *
 
5
 * See file LICENSE at the top of this source tree for license information.
 
6
 */
 
7
 
 
8
#ifndef _DBG_MALLOC_H_
 
9
#define _DBG_MALLOC_H_
 
10
 
 
11
#include <stdio.h>
 
12
#include <sys/types.h>
 
13
 
 
14
#ifdef  DEBUG_MALLOC
 
15
 
 
16
struct lib_context;
 
17
void *_dbg_malloc(size_t size, struct lib_context *lc,
 
18
                  const char *who, unsigned int line);
 
19
void *_dbg_realloc(void *ptr, size_t size, struct lib_context *lc,
 
20
                   const char *who, unsigned int line);
 
21
void *_dbg_strdup(void *ptr, struct lib_context *lc,
 
22
                  const char *who, unsigned int line);
 
23
void *_dbg_strndup(void *ptr, size_t len, struct lib_context *lc,
 
24
                   const char *who, unsigned int line);
 
25
void _dbg_free(void *ptr, struct lib_context *lc,
 
26
               const char *who, unsigned int line);
 
27
 
 
28
#define dbg_malloc(size)        _dbg_malloc((size), lc, __func__, __LINE__)
 
29
#define dbg_realloc(ptr, size)  _dbg_realloc((ptr), (size), lc, \
 
30
                                             __func__, __LINE__)
 
31
#define dbg_strdup(ptr)         _dbg_strdup((ptr), lc, __func__, __LINE__)
 
32
#define dbg_strndup(ptr, len)   _dbg_strdup((ptr), len, lc, __func__, __LINE__)
 
33
#define dbg_free(ptr)           _dbg_free((ptr), lc, __func__, __LINE__)
 
34
 
 
35
#else
 
36
 
 
37
void *_dbg_malloc(size_t size);
 
38
void *_dbg_realloc(void *ptr, size_t size);
 
39
void *_dbg_strdup(void *ptr);
 
40
void *_dbg_strndup(void *ptr, size_t len);
 
41
void _dbg_free(void *ptr);
 
42
 
 
43
#define dbg_malloc      _dbg_malloc
 
44
#define dbg_realloc     _dbg_realloc
 
45
#define dbg_strdup      _dbg_strdup
 
46
#define dbg_strndup     _dbg_strndup
 
47
#define dbg_free        _dbg_free
 
48
 
 
49
#endif /* #ifdef DEBUG_MALLOC */
 
50
 
 
51
#endif