~ubuntu-branches/ubuntu/trusty/hfsprogs/trusty-proposed

« back to all changes in this revision

Viewing changes to .pc/0009-Rename-dprintf-to-dbg_printf.patch/fsck_hfs.tproj/fsck_debug.h

  • Committer: Package Import Robot
  • Author(s): Rogério Brito
  • Date: 2013-10-24 01:20:15 UTC
  • Revision ID: package-import@ubuntu.com-20131024012015-qsncxmr4cielybvz
Tags: 332.25-11
* debian/control: Remove DMUA flag.
* debian/rules: Override rules for which we don't have makefiles.
  (Closes: #724195)
* debian/patches:
  + Change the headers to be friendlier with gbp pq.
  + Remove unreferenced patches in series file.
  + Coalesce all patches touching man pages into one.
  + Regenerate everything from patch-queue branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
 
3
 *
 
4
 * @APPLE_LICENSE_HEADER_START@
 
5
 * 
 
6
 * "Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
 
7
 * Reserved.  This file contains Original Code and/or Modifications of
 
8
 * Original Code as defined in and that are subject to the Apple Public
 
9
 * Source License Version 1.0 (the 'License').  You may not use this file
 
10
 * except in compliance with the License.  Please obtain a copy of the
 
11
 * License at http://www.apple.com/publicsource and read it before using
 
12
 * this file.
 
13
 * 
 
14
 * The Original Code and all software distributed under the License are
 
15
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 
16
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 
17
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 
18
 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
 
19
 * License for the specific language governing rights and limitations
 
20
 * under the License."
 
21
 * 
 
22
 * @APPLE_LICENSE_HEADER_END@
 
23
 */
 
24
#ifndef __FSCK_DEBUG__
 
25
#define __FSCK_DEBUG__
 
26
 
 
27
#include <sys/types.h>
 
28
 
 
29
enum debug_message_type {
 
30
        /* Type of information */
 
31
        d_info          =       0x0001, /* Normal information messages during execution */
 
32
        d_error         =       0x0002, /* Error messages */
 
33
 
 
34
        /* Category of verify/repair operation */
 
35
        d_xattr         =       0x0010, /* Extended attributes related messages */
 
36
        d_overlap       =       0x0020  /* Overlap extents related messages */
 
37
};
 
38
 
 
39
/* Current debug level of fsck_hfs for printing messages via dprintf */
 
40
extern unsigned long cur_debug_level;
 
41
 
 
42
/* Function: dprintf
 
43
 *
 
44
 * Description: Debug function similar to printf except the first parameter
 
45
 * which indicates the type of message to be printed by dprintf. Based on 
 
46
 * current debug level and the type of message, the function decides 
 
47
 * whether to print the message or not.
 
48
 *
 
49
 * Each unique message type has a bit assigned to it.  The message type 
 
50
 * passed to dprintf can be one or combination (OR-ed value) of pre-defined 
 
51
 * debug message types.  Only the messages whose type have one or more similar
 
52
 * bits set in comparison with current global debug level are printed. 
 
53
 *
 
54
 * For example, if cur_debug_level = 0x11 (d_info|d_xattr)
 
55
 * ----------------------------------------
 
56
 *      message type    -       printed/not printed
 
57
 * ----------------------------------------
 
58
 *      d_info                  -       printed
 
59
 *      d_error|d_xattr -       printed
 
60
 *      d_error                 -       not printed
 
61
 *      d_overlap               -       not printed
 
62
 *
 
63
 * Input:
 
64
 *      message_type - type of message, to determine when to print the message
 
65
 *      variable arguments - similar to printfs
 
66
 *
 
67
 * Output:
 
68
 *      Nothing
 
69
 */
 
70
extern void dprintf (unsigned long message_type, char *format, ...);
 
71
 
 
72
#endif /* __FSCK_DEBUG__ */