--- g_label_ufs.c.orig	Mon Jul 25 13:42:13 2005
+++ g_label_ufs.c	Mon Jul 25 13:33:29 2005
@@ -78,8 +78,8 @@
 		if (fs->fs_magic == FS_UFS1_MAGIC) {
 			G_LABEL_DEBUG(1, "UFS1 file system detected on %s.",
 			    pp->name);
-			if (fs->fs_old_size * fs->fs_fsize !=
-			    (int32_t)pp->mediasize) {
+			if (fs->fs_fsize <= 0 || 
+			    pp->mediasize / fs->fs_fsize != fs->fs_old_size) {
 				G_LABEL_DEBUG(1, "Incorrect superblock " \
 				    "parameters on %s.", pp->name);
 				g_free(fs);
@@ -90,6 +90,8 @@
 			    pp->name);
 			if (fs->fs_fsize <= 0 ||
 			    pp->mediasize / fs->fs_fsize != fs->fs_size) {
+				G_LABEL_DEBUG(1, "Incorrect superblock " \
+				    "parameters on %s.", pp->name);
 				g_free(fs);
 				continue;
 			}
