mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-08 10:03:17 +03:00
Fix device number handling for 2.6 kernels.
This commit is contained in:
parent
8630c7fb37
commit
8bad033938
@ -1,5 +1,6 @@
|
||||
Version 2.00.20 -
|
||||
==============================
|
||||
Fix device number handling for 2.6 kernels.
|
||||
|
||||
Version 2.00.19 - 29 June 2004
|
||||
==============================
|
||||
|
@ -1,3 +1,7 @@
|
||||
Version 1.00.19 -
|
||||
=============================
|
||||
Fix device number handling for 2.6 kernels.
|
||||
|
||||
Version 1.00.18 - 20 Jun 2004
|
||||
=============================
|
||||
Fix a uuid free in libdm-iface.
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
|
||||
#define NUMBER_OF_MAJORS 256
|
||||
#define NUMBER_OF_MAJORS 4096
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
@ -96,6 +96,7 @@ static int *_scan_proc_dev(const char *proc, const struct config_node *cn)
|
||||
int *max_partitions_by_major;
|
||||
char *name;
|
||||
|
||||
/* FIXME Make this sparse */
|
||||
if (!(max_partitions_by_major =
|
||||
dbg_malloc(sizeof(int) * NUMBER_OF_MAJORS))) {
|
||||
log_error("Filter failed to allocate max_partitions_by_major");
|
||||
|
@ -21,7 +21,9 @@
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef linux
|
||||
# include <linux/kdev_t.h>
|
||||
# define MAJOR(dev) ((dev & 0xfff00) >> 8)
|
||||
# define MINOR(dev) ((dev & 0xff) | ((dev >> 12) & 0xfff00))
|
||||
# define MKDEV(ma,mi) ((mi & 0xff) | (ma << 8) | ((mi & ~0xff) << 12))
|
||||
#else
|
||||
# define MAJOR(x) major((x))
|
||||
# define MINOR(x) minor((x))
|
||||
|
@ -16,9 +16,9 @@
|
||||
#ifndef _LINUX_LIBDM_COMPAT_H
|
||||
#define _LINUX_LIBDM_COMPAT_H
|
||||
|
||||
#include "kdev_t.h"
|
||||
#include <inttypes.h>
|
||||
#include <linux/dm-ioctl.h>
|
||||
#include <linux/kdev_t.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
struct dm_task;
|
||||
|
@ -33,8 +33,8 @@
|
||||
#include <limits.h>
|
||||
|
||||
#ifdef linux
|
||||
# include "kdev_t.h"
|
||||
# include <linux/limits.h>
|
||||
# include <linux/kdev_t.h>
|
||||
# include <linux/dm-ioctl.h>
|
||||
#else
|
||||
# define MAJOR(x) major((x))
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "libdm-common.h"
|
||||
#include "list.h"
|
||||
#include "log.h"
|
||||
#include "kdev_t.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -27,7 +28,6 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <linux/dm-ioctl.h>
|
||||
#include <linux/kdev_t.h>
|
||||
|
||||
#ifdef HAVE_SELINUX
|
||||
# include <selinux/selinux.h>
|
||||
|
@ -38,7 +38,7 @@ extern char *optarg;
|
||||
#endif
|
||||
|
||||
#ifdef linux
|
||||
# include <linux/kdev_t.h>
|
||||
# include "kdev_t.h"
|
||||
#else
|
||||
# define MAJOR(x) major((x))
|
||||
# define MINOR(x) minor((x))
|
||||
|
Loading…
Reference in New Issue
Block a user