svn commit: r267807 - in stable/10: sbin/mount_nullfs sys/x86/acpica

Craig Rodrigues rodrigc at FreeBSD.org
Mon Jun 23 22:31:29 UTC 2014


Author: rodrigc
Date: Mon Jun 23 22:31:28 2014
New Revision: 267807
URL: http://svnweb.freebsd.org/changeset/base/267807

Log:
  MFC r263795:
  
  Strict value checking will cause problem.
  Bay trail DN2820FYKH is supported on Linux but does not work on FreeBSD.
  This behaviour is bug-compatible with Linux-3.13.5.
  
  References:
  http://d.hatena.ne.jp/syuu1228/20140326
  http://lxr.linux.no/linux+v3.13.5/arch/x86/kernel/acpi/boot.c#L1094
  
  Submitted by: syuu
  PR: 187966

Modified:
  stable/10/sbin/mount_nullfs/mount_nullfs.c
  stable/10/sys/x86/acpica/madt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/mount_nullfs/mount_nullfs.c
==============================================================================
--- stable/10/sbin/mount_nullfs/mount_nullfs.c	Mon Jun 23 19:47:25 2014	(r267806)
+++ stable/10/sbin/mount_nullfs/mount_nullfs.c	Mon Jun 23 22:31:28 2014	(r267807)
@@ -103,18 +103,25 @@ main(int argc, char *argv[])
 		err(EX_USAGE, "%s", source);
 
 	if (subdir(target, source) || subdir(source, target))
-		errx(EX_USAGE, "%s (%s) and %s are not distinct paths",
+		errx(EX_USAGE, "%s (%s) and %s are not lldistinct paths",
 		    argv[0], target, argv[1]);
 
+	printf("Debug: 1\n");
 	build_iovec(&iov, &iovlen, "fstype", nullfs, (size_t)-1);
 	build_iovec(&iov, &iovlen, "fspath", source, (size_t)-1);
 	build_iovec(&iov, &iovlen, "target", target, (size_t)-1);
 	build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg));
+	printf("Debug: 2, source: %zd target: %zdd\n", strlen(source), strlen(target));
 	if (nmount(iov, iovlen, 0) < 0) {
-		if (errmsg[0] != 0)
+	printf("Debug: 3\n");
+		if (errmsg[0] != 0) {
+                        printf("Debug 4\n");
 			err(1, "%s: %s", source, errmsg);
-		else
+                }  
+		else {
+                        printf("Debug 5\n");
 			err(1, "%s", source);
+                 }
 	}
 	exit(0);
 }

Modified: stable/10/sys/x86/acpica/madt.c
==============================================================================
--- stable/10/sys/x86/acpica/madt.c	Mon Jun 23 19:47:25 2014	(r267806)
+++ stable/10/sys/x86/acpica/madt.c	Mon Jun 23 22:31:28 2014	(r267807)
@@ -306,10 +306,11 @@ interrupt_polarity(UINT16 IntiFlags, UIN
 	case ACPI_MADT_POLARITY_ACTIVE_HIGH:
 		return (INTR_POLARITY_HIGH);
 	case ACPI_MADT_POLARITY_ACTIVE_LOW:
-		return (INTR_POLARITY_LOW);
+		break;
 	default:
-		panic("Bogus Interrupt Polarity");
+		printf("WARNING: Bogus Interrupt Polarity. Assume POLALITY LOW");
 	}
+	return (INTR_POLARITY_LOW);
 }
 
 static enum intr_trigger
@@ -325,10 +326,13 @@ interrupt_trigger(UINT16 IntiFlags, UINT
 	case ACPI_MADT_TRIGGER_EDGE:
 		return (INTR_TRIGGER_EDGE);
 	case ACPI_MADT_TRIGGER_LEVEL:
-		return (INTR_TRIGGER_LEVEL);
+		break;
 	default:
-		panic("Bogus Interrupt Trigger Mode");
+		printf("WARNING: Bogus Interrupt Trigger Mode. Assume Level trigger.");
+		
+		break;
 	}
+	return (INTR_TRIGGER_LEVEL);
 }
 
 /*


More information about the svn-src-all mailing list