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

« back to all changes in this revision

Viewing changes to 1.0.0.rc15/lib/format/template/template.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 _TEMPLATE_H_
9
 
#define _TEMPLATE_H_
10
 
 
11
 
#ifdef  FORMAT_HANDLER
12
 
#undef  FORMAT_HANDLER
13
 
 
14
 
/* CODEME: code ondisk metadata definitions */
15
 
 
16
 
#include <stdint.h>
17
 
 
18
 
#define TEMPLATE_CONFIGOFFSET   ((di->sectors - 1) << 9)
19
 
#define TEMPLATE_DATAOFFSET             0
20
 
 
21
 
struct template {
22
 
        uint8_t magic_name[8];  /* metadata has a 'magic' name ? */
23
 
#define TEMPLATE_MAGIC_NAME     "TEMPLATE"
24
 
 
25
 
        uint32_t magic;         /* and/or metadata has a 'magic' number ? */
26
 
#define TEMPLATE_MAGIC_OK       0xABCDEF
27
 
 
28
 
        uint8_t type;           /* RAID level */
29
 
#define TEMPLATE_T_SPAN 0
30
 
#define TEMPLATE_T_RAID0 1
31
 
 
32
 
        uint8_t disk_number;    /* Absolute disk number in set. */
33
 
        /* etc. */
34
 
 
35
 
        ... ....                /* members for numbers of disks, whatever... */
36
 
} __attribute__ ((packed));
37
 
#endif
38
 
 
39
 
/* Prototype of the register function for this metadata format handler */
40
 
int register_template(struct lib_context *lc);
41
 
 
42
 
#endif