diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-17 09:32:49 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-17 09:32:49 -0300 |
commit | 214e2ca2b82d335935a861c253fe94c61ad77aad (patch) | |
tree | eee42ff74d10470789d919b8499737ad0e919360 /include/linux/loop.h | |
parent | 1fdead8ad31d3aa833bc37739273fcde89ace93c (diff) | |
parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) |
Merge tag 'v3.7-rc1' into staging/for_v3.8
Linux 3.7-rc1
* tag 'v3.7-rc1': (9579 commits)
Linux 3.7-rc1
x86, boot: Explicitly include autoconf.h for hostprogs
perf: Fix UAPI fallout
ARM: config: make sure that platforms are ordered by option string
ARM: config: sort select statements alphanumerically
UAPI: (Scripted) Disintegrate include/linux/byteorder
UAPI: (Scripted) Disintegrate include/linux
UAPI: Unexport linux/blk_types.h
UAPI: Unexport part of linux/ppp-comp.h
perf: Handle new rbtree implementation
procfs: don't need a PATH_MAX allocation to hold a string representation of an int
vfs: embed struct filename inside of names_cache allocation if possible
audit: make audit_inode take struct filename
vfs: make path_openat take a struct filename pointer
vfs: turn do_path_lookup into wrapper around struct filename variant
audit: allow audit code to satisfy getname requests from its names_list
vfs: define struct filename and have getname() return it
btrfs: Fix compilation with user namespace support enabled
userns: Fix posix_acl_file_xattr_userns gid conversion
userns: Properly print bluetooth socket uids
...
Diffstat (limited to 'include/linux/loop.h')
-rw-r--r-- | include/linux/loop.h | 93 |
1 files changed, 4 insertions, 89 deletions
diff --git a/include/linux/loop.h b/include/linux/loop.h index 11a41a8f08e..6492181bcb1 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h @@ -1,6 +1,3 @@ -#ifndef _LINUX_LOOP_H -#define _LINUX_LOOP_H - /* * include/linux/loop.h * @@ -9,15 +6,14 @@ * Copyright 1993 by Theodore Ts'o. Redistribution of this file is * permitted under the GNU General Public License. */ +#ifndef _LINUX_LOOP_H +#define _LINUX_LOOP_H -#define LO_NAME_SIZE 64 -#define LO_KEY_SIZE 32 - -#ifdef __KERNEL__ #include <linux/bio.h> #include <linux/blkdev.h> #include <linux/spinlock.h> #include <linux/mutex.h> +#include <uapi/linux/loop.h> /* Possible states of device */ enum { @@ -44,7 +40,7 @@ struct loop_device { int lo_encrypt_key_size; struct loop_func_table *lo_encryption; __u32 lo_init[2]; - uid_t lo_key_owner; /* Who set the key */ + kuid_t lo_key_owner; /* Who set the key */ int (*ioctl)(struct loop_device *, int cmd, unsigned long arg); @@ -66,69 +62,6 @@ struct loop_device { struct gendisk *lo_disk; }; -#endif /* __KERNEL__ */ - -/* - * Loop flags - */ -enum { - LO_FLAGS_READ_ONLY = 1, - LO_FLAGS_AUTOCLEAR = 4, - LO_FLAGS_PARTSCAN = 8, -}; - -#include <asm/posix_types.h> /* for __kernel_old_dev_t */ -#include <linux/types.h> /* for __u64 */ - -/* Backwards compatibility version */ -struct loop_info { - int lo_number; /* ioctl r/o */ - __kernel_old_dev_t lo_device; /* ioctl r/o */ - unsigned long lo_inode; /* ioctl r/o */ - __kernel_old_dev_t lo_rdevice; /* ioctl r/o */ - int lo_offset; - int lo_encrypt_type; - int lo_encrypt_key_size; /* ioctl w/o */ - int lo_flags; /* ioctl r/o */ - char lo_name[LO_NAME_SIZE]; - unsigned char lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */ - unsigned long lo_init[2]; - char reserved[4]; -}; - -struct loop_info64 { - __u64 lo_device; /* ioctl r/o */ - __u64 lo_inode; /* ioctl r/o */ - __u64 lo_rdevice; /* ioctl r/o */ - __u64 lo_offset; - __u64 lo_sizelimit;/* bytes, 0 == max available */ - __u32 lo_number; /* ioctl r/o */ - __u32 lo_encrypt_type; - __u32 lo_encrypt_key_size; /* ioctl w/o */ - __u32 lo_flags; /* ioctl r/o */ - __u8 lo_file_name[LO_NAME_SIZE]; - __u8 lo_crypt_name[LO_NAME_SIZE]; - __u8 lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */ - __u64 lo_init[2]; -}; - -/* - * Loop filter types - */ - -#define LO_CRYPT_NONE 0 -#define LO_CRYPT_XOR 1 -#define LO_CRYPT_DES 2 -#define LO_CRYPT_FISH2 3 /* Twofish encryption */ -#define LO_CRYPT_BLOW 4 -#define LO_CRYPT_CAST128 5 -#define LO_CRYPT_IDEA 6 -#define LO_CRYPT_DUMMY 9 -#define LO_CRYPT_SKIPJACK 10 -#define LO_CRYPT_CRYPTOAPI 18 -#define MAX_LO_CRYPT 20 - -#ifdef __KERNEL__ /* Support for loadable transfer modules */ struct loop_func_table { int number; /* filter type */ @@ -147,21 +80,3 @@ int loop_register_transfer(struct loop_func_table *funcs); int loop_unregister_transfer(int number); #endif -/* - * IOCTL commands --- we will commandeer 0x4C ('L') - */ - -#define LOOP_SET_FD 0x4C00 -#define LOOP_CLR_FD 0x4C01 -#define LOOP_SET_STATUS 0x4C02 -#define LOOP_GET_STATUS 0x4C03 -#define LOOP_SET_STATUS64 0x4C04 -#define LOOP_GET_STATUS64 0x4C05 -#define LOOP_CHANGE_FD 0x4C06 -#define LOOP_SET_CAPACITY 0x4C07 - -/* /dev/loop-control interface */ -#define LOOP_CTL_ADD 0x4C80 -#define LOOP_CTL_REMOVE 0x4C81 -#define LOOP_CTL_GET_FREE 0x4C82 -#endif |