]> granicus.if.org Git - spl/commitdiff
32-bit compat, hostid_read()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 20 Jul 2012 18:12:19 +0000 (11:12 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 20 Jul 2012 18:14:04 +0000 (11:14 -0700)
Explicitly cast the sizeof in hostid_read() to prevent the
following compiler warning on 32-bit systems.

  module/spl/spl-generic.c:490:10: error: format '%lu' expects
  argument of type 'long unsigned int', but argument 4 has type
  'unsigned int' [-Werror=format]

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/spl/spl-generic.c

index 785f668d69ca9569d1e29614d3f987e9f2d0a433..13f4267336673ebe17ed3fc88934199ffd7bf203 100644 (file)
@@ -486,8 +486,8 @@ hostid_read(void)
        if (size < sizeof(HW_HOSTID_MASK)) {
                printk(KERN_WARNING
                       "SPL: Ignoring the %s file because it is %llu bytes; "
-                      "expecting %lu bytes instead.\n",
-                      spl_hostid_path, size, sizeof(HW_HOSTID_MASK));
+                      "expecting %lu bytes instead.\n", spl_hostid_path,
+                      size, (unsigned long)sizeof(HW_HOSTID_MASK));
                kobj_close_file(file);
                return -3;
        }