Skip to contentSkip to conversation

kvm-72 - fix compilation on 2.6.26 (anon_inode_getfd flag)

PATH Applied Nikola Ciprich 4 participants 6 messages Jul 29, 2008 – Jul 31, 2008 KVM

lore
Share & tools
lore
#0 lore raw

Hi,
anon_inode_getfd flag parameter was added after 2.6.26 following patch fixes compilation
please apply
thanks
nik

Signature · 13 lines
-------------------------------------
Nikola CIPRICH
LinuxBox.cz, s.r.o.
28. rijna 168, 709 01 Ostrava

tel.:   +420 596 603 142
fax:    +420 596 621 273
mobil:  +420 777 093 799
www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: [email protected]
-------------------------------------
kernel/anon_inodes.c +9 -0
diff -Naur kvm-72/kernel/anon_inodes.c kvm-72-fix-2.6.26-anon-inode/kernel/anon_inodes.c
@@ -245,6 +245,15 @@
 	return fd;
 }
 
+#elif LINUX_VERSION_CODE == KERNEL_VERSION(2,6,26)
+
+int kvm_anon_inode_getfd(const char *name,
+			 const struct file_operations *fops,
+			 void *priv, int flags)
+{
+	return anon_inode_getfd(name, fops, priv);
+}
+
 #else
 
 int kvm_anon_inode_getfd(const char *name,
#1 lore raw
Quoted 15 lines · Nikola Ciprich

Hi,
anon_inode_getfd flag parameter was added after 2.6.26 following patch fixes compilation
please apply
thanks
nik

------------------------------------------------------------------------

diff -Naur kvm-72/kernel/anon_inodes.c kvm-72-fix-2.6.26-anon-inode/kernel/anon_inodes.c

kernel/anon_inodes.c line 248

Quoted 4 lines
kernel/anon_inodes.c +1 -0
@@ -245,6 +245,15 @@
 	return fd;
 }
 
+#elif LINUX_VERSION_CODE == KERNEL_VERSION(2,6,26)

Should that be ">=" for future use?

Quoted 11 lines
kernel/anon_inodes.c +8 -0
+
+int kvm_anon_inode_getfd(const char *name,
+			 const struct file_operations *fops,
+			 void *priv, int flags)
+{
+	return anon_inode_getfd(name, fops, priv);
+}
+
 #else
 
 int kvm_anon_inode_getfd(const char *name,
Signature · 3 lines
Bill Davidsen <[email protected]>
  "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot
#2 lore raw
Quoted 1 line

Should that be ">=" for future use?

nope, newer versions have also the flag parameter (see 2.6.27-rcX), so this is intended only for 2.6.26

Signature · 14 lines
-------------------------------------
Nikola CIPRICH
LinuxBox.cz, s.r.o.
28. rijna 168, 709 01 Ostrava

tel.:   +420 596 603 142
fax:    +420 596 621 273
mobil:  +420 777 093 799

www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: [email protected]
-------------------------------------
#3 lore raw
Quoted 5 lines · Nikola Ciprich
Quoted 2 lines

Should that be ">=" for future use?

nope, newer versions have also the flag parameter (see 2.6.27-rcX), so this is intended only for 2.6.26

Please resend the patch as I don't have it in my mailbox.

Signature · 1 line
error compiling committee.c: too many arguments to function
#4 lore raw

Hi, sure.
hope it's OK
n.
PS: I mean't PATCH, not PATH of course. Although it was quite a long path to patch :)

Quoted 12 lines · Avi Kivity
Quoted 5 lines · Nikola Ciprich
Quoted 2 lines

Should that be ">=" for future use?

nope, newer versions have also the flag parameter (see 2.6.27-rcX), so this is intended only for 2.6.26

Please resend the patch as I don't have it in my mailbox.

Signature · 1 line
error compiling committee.c: too many arguments to function
Signature · 14 lines
-------------------------------------
Nikola CIPRICH
LinuxBox.cz, s.r.o.
28. rijna 168, 709 01 Ostrava

tel.:   +420 596 603 142
fax:    +420 596 621 273
mobil:  +420 777 093 799

www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: [email protected]
-------------------------------------
kernel/anon_inodes.c +9 -0
diff -Naur kvm-72/kernel/anon_inodes.c kvm-72-fix-2.6.26-anon-inode/kernel/anon_inodes.c
@@ -245,6 +245,15 @@
 	return fd;
 }
 
+#elif LINUX_VERSION_CODE == KERNEL_VERSION(2,6,26)
+
+int kvm_anon_inode_getfd(const char *name,
+			 const struct file_operations *fops,
+			 void *priv, int flags)
+{
+	return anon_inode_getfd(name, fops, priv);
+}
+
 #else
 
 int kvm_anon_inode_getfd(const char *name,
Applied
#5 lore raw
Quoted 3 lines · Nikola Ciprich

Hi, sure.
hope it's OK

Applied, thanks. Please signoff in the future.

Signature · 1 line
error compiling committee.c: too many arguments to function