1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
/*
* common.h : Utility for the Linux Multiple Devices driver
* Copyright (C) 1997 Ingo Molnar, Miguel de Icaza, Gadi Oxman
* Copyright (C) 1998 Erik Troan
*
* Common includes and declarations.
*
* This source is covered by the GNU GPL, the same as all Linux kernel
* sources.
*/
#ifndef H_COMMON
#define H_COMMON
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <errno.h>
#include "md-int.h"
typedef int kdev_t;
#include <linux/unistd.h>
#define DEBUG (0)
#define EXIT_USAGE (EXIT_FAILURE)
#define EXIT_VERSION (0)
#define MAX_LINE_LENGTH (100)
#define ZERO_BUFFER_SIZE (64) /* 64kB */
#define MD_BLK_SIZ (0x400)
#define RAID_CONFIG "/etc/raidtab"
#define MKRAID_MAJOR_VERSION (0)
#define MKRAID_MINOR_VERSION (90)
#define MKRAID_PATCHLEVEL_VERSION (0)
extern int do_quiet_flag;
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define OUT(x...) do { if (!do_quiet_flag) fprintf(stderr,##x); } while (0)
#define ERR(x...) fprintf(stderr,##x)
#endif
|