what i need is a little attention-RE [linux-lvm] SoftRaid and LVM Jean-Eric Cuendet

Jean-Eric Cuendet Jean-Eric.Cuendet at linkvest.com
Wed Sep 5 07:57:47 UTC 2001


> and one more question about the min-max
> i don't speak "C" can you tell me how to do it with pre
> linux-2.4.9patches wich i wont to aply to linux-2.4.10pre2 
> and they are giving me problems 
> with min-max definition

The min/max functions are simple functions that return the min/max of
two numbers.
Ex: min(3,4) return 3
Now, Linus has added a type to those functions in 2.4.8 (I think):
Ex: min(int, 3, 4) = 3
Or: min(float, -6.45, 4.5) = -6.45

So, either you change the call from:
min(a, b) to min(int,a,b)
Or you add the provided replacement functions:
#define min(a,b) (((a)<(b))?(a):(b)) 
#define max(a,b) (((a)>(b))?(a):(b)) 
At the *beginning* of the file (before anything else).

Note that these are not real functions but just macros. That's why it's
so simple (just add them and forget).

Bye
-jec





More information about the linux-lvm mailing list