Print this page
8699 Want NIC transceiver visibility (fix lint)

@@ -26,14 +26,14 @@
 #include <sys/mman.h>
 
 int
 main(void)
 {
-        int ret;
         void *addr;
         nvlist_t *nvl;
         size_t len = getpagesize();
+        int ret;
 
         /*
          * Get an unreadable page
          */
         if ((addr = mmap(NULL, len, PROT_READ, MAP_PRIVATE | MAP_ANON, -1,

@@ -44,11 +44,11 @@
         if (mprotect(addr, len, PROT_NONE) != 0) {
                 err(1, "TEST FAILED: failed to protect private page");
         }
 
         if ((ret = libsff_parse(addr, 128, 0xa0, &nvl)) != EFAULT) {
-                errx(1, "TEST FAILED: failed to return EFAULT on bad"
-                    "data buffer\n");
+                errx(1, "TEST FAILED: failed to return EFAULT on bad "
+                    "data buffer (%s instead)\n", strerror(ret));
         }
 
         return (0);
 }