From: Jens Axboe Date: Wed, 9 Nov 2005 08:18:27 +0000 (+0100) Subject: [PATCH] Make 'ARCH' a define, it may not be used X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=5fe27a7b946929318e947bc952ad6055a1b9978d;p=disktools.git [PATCH] Make 'ARCH' a define, it may not be used --- diff --git a/arch-alpha.h b/arch-alpha.h index be06047..b1b1e8a 100644 --- a/arch-alpha.h +++ b/arch-alpha.h @@ -1,7 +1,7 @@ #ifndef ARCH_ALPHA_H #define ARCH_ALPHA_H -static int arch = arch_alpha; +#define ARCH (arch_alpha) #ifndef __NR_ioprio_set #define __NR_ioprio_set 442 diff --git a/arch-ia64.h b/arch-ia64.h index 5b55e8a..c9c0508 100644 --- a/arch-ia64.h +++ b/arch-ia64.h @@ -1,7 +1,7 @@ #ifndef ARCH_IA64_H #define ARCH_IA64_H -static int arch = arch_ia64; +#define ARCH (arch_ia64) #ifndef __NR_ioprio_set #define __NR_ioprio_set 1274 diff --git a/arch-ppc.h b/arch-ppc.h index 8469657..e16f99b 100644 --- a/arch-ppc.h +++ b/arch-ppc.h @@ -1,7 +1,7 @@ #ifndef ARCH_PPC_H #define ARCH_PPH_H -static int arch = arch_ppc; +#define ARCH (arch_ppc) #ifndef __NR_ioprio_set #define __NR_ioprio_set 273 diff --git a/arch-s390.h b/arch-s390.h index 81f0377..956dccf 100644 --- a/arch-s390.h +++ b/arch-s390.h @@ -1,7 +1,7 @@ #ifndef ARCH_S390_H #define ARCH_S390_H -static int arch = arch_s390; +#define ARCH (arch_s390) #ifndef __NR_ioprio_set #define __NR_ioprio_set 282 diff --git a/arch-x86.h b/arch-x86.h index 502e9ce..4e74c0c 100644 --- a/arch-x86.h +++ b/arch-x86.h @@ -1,7 +1,7 @@ #ifndef ARCH_X86_H #define ARCH_X86_H -static int arch = arch_i386; +#define ARCH (arch_i386) #ifndef __NR_ioprio_set #define __NR_ioprio_set 289 diff --git a/arch-x86_64.h b/arch-x86_64.h index c8350ab..cca66f6 100644 --- a/arch-x86_64.h +++ b/arch-x86_64.h @@ -1,7 +1,7 @@ #ifndef ARCH_X86_64_h #define ARCH_X86_64_h -static int arch = arch_x86_64; +#define ARCH (arch_x86_64) #ifndef __NR_ioprio_set #define __NR_ioprio_set 251 diff --git a/drivescan.c b/drivescan.c index e4299ed..f346ae0 100644 --- a/drivescan.c +++ b/drivescan.c @@ -149,7 +149,7 @@ int load_progress_state(void) printf("Unsupported file version (%d)\n", (int) state.version); return 1; } - if (state.arch != arch) { + if (state.arch != ARCH) { printf("State file from different arch\n"); return 1; } @@ -201,7 +201,7 @@ void save_progress_state(void) memset(&state, 0, sizeof(state)); state.magic = DRIVESCAN_MAGIC; - state.arch = arch; + state.arch = ARCH; state.version = DRIVESCAN_VERSION; state.bs = block_size; state.blocks = dev_size;