From nobody Sun Jan 05 20:16:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YR7r613w5z5kBvd; Sun, 05 Jan 2025 20:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YR7r60R7Rz4QHV; Sun, 5 Jan 2025 20:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736108198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hY5rJVs8qBIL8xciYN6jQz39CC5O+zEa0WXWCUe3S5w=; b=I6oZd+DkHW22zFNbJ/L2PaFMW2TvfcuTKsJVVBg0WR7//M8GUZ1+tffk3a4COkRGZu8Y9K PkR7jDM62tj+PaXc9+uWRFZg6euDug7HgsZpfQEOiJbbMvv/MiFSOvj9uQC4nVX8gTP6B/ ycATu98uOyBeTvyH3pLHXJYV42jK3nGiWqz+6G9efrknwYWmyWZmKK40aS5qu7PwdapECw iVx086NGY0gvpFUk+/idKwR+gxa+i8xB7ZomFd2bubBcGXdTwfCouZGylidloCcTIqWT8w t1wssp6+XQnsHjtBOK/JGHdDKEunSGZSzN+mKaTYGLyc4t6TirSZa8RuAuFuCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736108198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hY5rJVs8qBIL8xciYN6jQz39CC5O+zEa0WXWCUe3S5w=; b=XPEfxkuU30k6GiPpbU2+8mf5N6RcAqLcNh9XOBBlQgx6wjvEeSXsnmsXZ3gFBZ/Yz0jFPA Vw9wy1lMaCZfV8zv8jrQCO7BEXQowMEzD334nTvVO2kUopVAVIHGCJet8Fh/QdyegovAXE +ukZfinXyuYFiSlmmy65MA8NuG6UC/K5o5mauo/MqSfOkLCqAHd68qN8/UNp0dzij6gYjg mJMgb5dud26gKbrKN9QXsaQqOy/lbCPOqk2m4YQKCwiCyi2rOSCIwjFHq3CJ53dd36nc0N rtzXNRax4ScWNhk67JmiTYmoNt+BJiYsmv7IcGXhzXhj2Pyc9hLKmMLw3HKTnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736108198; a=rsa-sha256; cv=none; b=lNAqm51EkEXgJT/PsE7aliQFI798PSHqpQ5ZfeEZztEiBYauelQ+871G+kw0b1nHrOpraw 38jsCVTkXnz7ynUmTyBEk7g1wGVg8tLC1qjcmRyNrXNSWsye4IOu4135QMil9cjdhq7VVl 4VeHqkQ8vHxJJRuUV93GuR8HYs28KS3pJ8Rf3Tn9LA9zOp3PMazSCaU/eoZhYedG70GoKk DaJwOMXi+DwOS6M9LD++9pjokR4du+RxtG+Y7s+qjuKwWBzfkUTprjMj9eT/A24XGBwmx6 +orGJJ3unA0x0U4gjwFuEu63XEA3tTY9G9JRuJhwgZDh8yDICvvmNrDFojuJJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YR7r56xkKzt6N; Sun, 05 Jan 2025 20:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 505KGbdd056651; Sun, 5 Jan 2025 20:16:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 505KGbXu056648; Sun, 5 Jan 2025 20:16:37 GMT (envelope-from git) Date: Sun, 5 Jan 2025 20:16:37 GMT Message-Id: <202501052016.505KGbXu056648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: d830cac9fed1 - main - recoverdisk: Fix comparison between stripesize and sectorsize List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d830cac9fed1882a192b0ec5c96fb3ac9bfbc2ee Auto-Submitted: auto-generated The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=d830cac9fed1882a192b0ec5c96fb3ac9bfbc2ee commit d830cac9fed1882a192b0ec5c96fb3ac9bfbc2ee Author: Poul-Henning Kamp AuthorDate: 2025-01-05 20:14:37 +0000 Commit: Poul-Henning Kamp CommitDate: 2025-01-05 20:16:22 +0000 recoverdisk: Fix comparison between stripesize and sectorsize Discovered trying to read a 360KB floppy disk :-) --- sbin/recoverdisk/recoverdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/recoverdisk/recoverdisk.c b/sbin/recoverdisk/recoverdisk.c index 91f42c904c52..446266c36d50 100644 --- a/sbin/recoverdisk/recoverdisk.c +++ b/sbin/recoverdisk/recoverdisk.c @@ -482,7 +482,7 @@ main(int argc, char * const argv[]) err(1, "DIOCGSECTORSIZE failed"); error = ioctl(fdr, DIOCGSTRIPESIZE, &stripesize); - if (error == 0 && stripesize > sectorsize) + if (error == 0 && stripesize < sectorsize) sectorsize = stripesize; minsize = sectorsize;