~jderose/ubuntu/raring/qemu/vde-again

« back to all changes in this revision

Viewing changes to linux-user/linux_loop.h

  • Committer: Bazaar Package Importer
  • Author(s): Aurelien Jarno, Aurelien Jarno
  • Date: 2009-03-07 06:20:34 UTC
  • mfrom: (1.1.9 upstream)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20090307062034-i3pead4mw653v2el
Tags: 0.10.0-1
[ Aurelien Jarno ]
* New upstream release:
  - Fix fr-be keyboard mapping (closes: bug#514462).
  - Fix stat64 structure on ppc-linux-user (closes: bug#470231).
  - Add a chroot option (closes: bug#415996).
  - Add evdev support (closes: bug#513210).
  - Fix loop on symlinks in user mode (closes: bug#297572).
  - Bump depends on openbios-sparc.
  - Depends on openbios-ppc.
  - Update 12_signal_powerpc_support.patch.
  - Update 21_net_soopts.patch.
  - Drop 44_socklen_t_check.patch (merged upstream).
  - Drop 49_null_check.patch (merged upstream).
  - Update 64_ppc_asm_constraints.patch.
  - Drop security/CVE-2008-0928-fedora.patch (merged upstream).
  - Drop security/CVE-2007-5730.patch (merged upstream).
* patches/80_stable-branch.patch: add patches from stable branch:
  - Fix race condition between signal handler/execution loop (closes:
    bug#474386, bug#501731).
* debian/copyright: update.
* Compile and install .dtb files:
  - debian/control: build-depends on device-tree-compiler.
  - debian/patches/81_compile_dtb.patch: new patch from upstream.
  - debian/rules: compile and install bamboo.dtb and mpc8544.dtb.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copied from 2.6.25 kernel headers to avoid problems on older hosts.  */
 
2
#ifndef _LINUX_LOOP_H
 
3
#define _LINUX_LOOP_H
 
4
 
 
5
/*
 
6
 * include/linux/loop.h
 
7
 *
 
8
 * Written by Theodore Ts'o, 3/29/93.
 
9
 *
 
10
 * Copyright 1993 by Theodore Ts'o.  Redistribution of this file is
 
11
 * permitted under the GNU General Public License.
 
12
 */
 
13
 
 
14
#define LO_NAME_SIZE    64
 
15
#define LO_KEY_SIZE     32
 
16
 
 
17
 
 
18
/*
 
19
 * Loop flags
 
20
 */
 
21
enum {
 
22
        LO_FLAGS_READ_ONLY      = 1,
 
23
        LO_FLAGS_USE_AOPS       = 2,
 
24
        LO_FLAGS_AUTOCLEAR      = 4,
 
25
};
 
26
 
 
27
#include <linux/version.h>
 
28
#include <asm/posix_types.h>    /* for __kernel_old_dev_t */
 
29
#include <asm/types.h>          /* for __u64 */
 
30
 
 
31
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) /* This is a guess.  */
 
32
#define __kernel_old_dev_t __kernel_dev_t
 
33
#endif
 
34
 
 
35
/* Backwards compatibility version */
 
36
struct loop_info {
 
37
        int                lo_number;           /* ioctl r/o */
 
38
        __kernel_old_dev_t lo_device;           /* ioctl r/o */
 
39
        unsigned long      lo_inode;            /* ioctl r/o */
 
40
        __kernel_old_dev_t lo_rdevice;          /* ioctl r/o */
 
41
        int                lo_offset;
 
42
        int                lo_encrypt_type;
 
43
        int                lo_encrypt_key_size;         /* ioctl w/o */
 
44
        int                lo_flags;                    /* ioctl r/o */
 
45
        char               lo_name[LO_NAME_SIZE];
 
46
        unsigned char      lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */
 
47
        unsigned long      lo_init[2];
 
48
        char               reserved[4];
 
49
};
 
50
 
 
51
struct loop_info64 {
 
52
        __u64              lo_device;                   /* ioctl r/o */
 
53
        __u64              lo_inode;                    /* ioctl r/o */
 
54
        __u64              lo_rdevice;                  /* ioctl r/o */
 
55
        __u64              lo_offset;
 
56
        __u64              lo_sizelimit;/* bytes, 0 == max available */
 
57
        __u32              lo_number;                   /* ioctl r/o */
 
58
        __u32              lo_encrypt_type;
 
59
        __u32              lo_encrypt_key_size;         /* ioctl w/o */
 
60
        __u32              lo_flags;                    /* ioctl r/o */
 
61
        __u8               lo_file_name[LO_NAME_SIZE];
 
62
        __u8               lo_crypt_name[LO_NAME_SIZE];
 
63
        __u8               lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */
 
64
        __u64              lo_init[2];
 
65
};
 
66
 
 
67
/*
 
68
 * Loop filter types
 
69
 */
 
70
 
 
71
#define LO_CRYPT_NONE           0
 
72
#define LO_CRYPT_XOR            1
 
73
#define LO_CRYPT_DES            2
 
74
#define LO_CRYPT_FISH2          3    /* Twofish encryption */
 
75
#define LO_CRYPT_BLOW           4
 
76
#define LO_CRYPT_CAST128        5
 
77
#define LO_CRYPT_IDEA           6
 
78
#define LO_CRYPT_DUMMY          9
 
79
#define LO_CRYPT_SKIPJACK       10
 
80
#define LO_CRYPT_CRYPTOAPI      18
 
81
#define MAX_LO_CRYPT            20
 
82
 
 
83
/*
 
84
 * IOCTL commands --- we will commandeer 0x4C ('L')
 
85
 */
 
86
 
 
87
#define LOOP_SET_FD             0x4C00
 
88
#define LOOP_CLR_FD             0x4C01
 
89
#define LOOP_SET_STATUS         0x4C02
 
90
#define LOOP_GET_STATUS         0x4C03
 
91
#define LOOP_SET_STATUS64       0x4C04
 
92
#define LOOP_GET_STATUS64       0x4C05
 
93
#define LOOP_CHANGE_FD          0x4C06
 
94
 
 
95
#endif