summarylogtreecommitdiffstats
path: root/01-linux3.0_uname.patch
blob: 6818af87b1af1b93b6df09390521e113edd68e22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff -aur ncpfs-2.2.6.org/sutil/ncpm_common.c ncpfs-2.2.6/sutil/ncpm_common.c     
--- ncpfs-2.2.6.org/sutil/ncpm_common.c	2011-08-23 16:45:11.000000000 +0200
+++ ncpfs-2.2.6/sutil/ncpm_common.c	2011-08-23 16:52:26.049972551 +0200 
@@ -245,13 +245,13 @@
 
 static int getmountver(void) {
 	struct utsname name;
-	int maj, mid, rev;
+	int maj = 0, mid = 0, rev = 0;
 	int ver;
 
 	if (uname(&name)) {
 		errexit(1, _("Cannot get kernel release\n"));
 	}
-	if (sscanf(name.release, "%d.%d.%d", &maj, &mid, &rev) != 3) {
+	if (sscanf(name.release, "%d.%d-ARCH", &maj, &mid) != 2) {
 		errexit(2, _("Cannot convert kernel release \"%s\" to number\n"), name.release);
 	}
 	ver = maj*0x10000 + mid*0x100 + rev;