]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdmon.h
sysfs: Use the presence of /sys/block/<dev>/md as indicator of valid device
[thirdparty/mdadm.git] / mdmon.h
diff --git a/mdmon.h b/mdmon.h
index 5a8e1209822c3ff2ca3fe5ab95796ff085973766..0b08c3d7da2a62e6b3934e0b2716cd85fd2dc759 100644 (file)
--- a/mdmon.h
+++ b/mdmon.h
@@ -18,8 +18,7 @@
  * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#undef pr_err
-#define pr_err(fmt ...) fprintf(stderr, "mdmon: " fmt)
+extern const char Name[];
 
 enum array_state { clear, inactive, suspended, readonly, read_auto,
                   clean, active, write_pending, active_idle, bad_word};
@@ -102,7 +101,7 @@ static inline int is_resync_complete(struct mdinfo *array)
                break;
        case 10:
                l = array->array.layout;
-               ncopies = (l & 0xff) * ((l >> 8) && 0xff);
+               ncopies = (l & 0xff) * ((l >> 8) & 0xff);
                sync_size = array->component_size * array->array.raid_disks;
                sync_size /= ncopies;
                break;