NetBSD Problem Report #56529
From www@netbsd.org Wed Dec 1 06:33:39 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id A73F11A921F
for <gnats-bugs@gnats.NetBSD.org>; Wed, 1 Dec 2021 06:33:39 +0000 (UTC)
Message-Id: <20211201063338.D5A521A9239@mollari.NetBSD.org>
Date: Wed, 1 Dec 2021 06:33:38 +0000 (UTC)
From: rvp@SDF.ORG
Reply-To: rvp@SDF.ORG
To: gnats-bugs@NetBSD.org
Subject: mount: exec mount_ for /mnt: mount_: No such file or directory
X-Send-Pr-Version: www-1.0
>Number: 56529
>Category: bin
>Synopsis: mount: exec mount_ for /mnt: mount_: No such file or directory
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 01 06:35:00 +0000 2021
>Last-Modified: Thu Dec 02 13:30:01 +0000 2021
>Originator: RVP
>Release: NetBSD/amd64 9.99.92
>Organization:
>Environment:
NetBSD x202e.localdomain 9.99.92 NetBSD 9.99.92 (MYKERNEL) #0: Wed Dec 1 00:05:59 UTC 2021 bld@x202e.localdomain:/usr/obj/usr/src/sys/arch/amd64/compile/MYKERNEL amd64
>Description:
mount(8) should try FFS when ioctl(DIOCGWEDGEINFO) returns an empty
`dkw_ptype':
# dkctl wd0 listwedges | fgrep dk13
dk13: OpenBSD_6.9, 62914560 blocks at 188796928, type:
# mount -r /dev/dk13 /mnt
mount: exec mount_ for /mnt: mount_: No such file or directory
#
>How-To-Repeat:
As above.
>Fix:
diff -urN sbin/mount.orig/mount.c sbin/mount/mount.c
--- sbin/mount.orig/mount.c 2021-11-22 21:56:16.545929587 +0000
+++ sbin/mount/mount.c 2021-11-30 06:19:06.108837606 +0000
@@ -743,7 +743,9 @@
if (ioctl(fd, DIOCGWEDGEINFO, &dkw) == 0) {
/* Yup, this is easy. */
(void) close(fd);
- return (dkw.dkw_ptype);
+ if (dkw.dkw_ptype && *dkw.dkw_ptype)
+ return (dkw.dkw_ptype);
+ return NULL;
}
if (ioctl(fd, DIOCGDINFO, &dl) == -1) {
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/56529 CVS commit: src/sbin/mount
Date: Thu, 2 Dec 2021 08:26:40 -0500
Module Name: src
Committed By: christos
Date: Thu Dec 2 13:26:40 UTC 2021
Modified Files:
src/sbin/mount: mount.c
Log Message:
PR/56529: RVP: mount should try ffs when DIOCGWEDGEINFO returns an empty
dkw_ptype.
To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sbin/mount/mount.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.