From owner-svn-src-head@freebsd.org Thu Feb 7 22:00:57 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 457A814C5CE6; Thu, 7 Feb 2019 22:00:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D4AB076170; Thu, 7 Feb 2019 22:00:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 6F4661E7F3; Thu, 7 Feb 2019 22:00:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 310A22AC4; Thu, 7 Feb 2019 22:00:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id oeCuskIiFppg; Thu, 7 Feb 2019 22:00:51 +0000 (UTC) Subject: Re: svn commit: r343881 - head/lib/libutil DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com 7707A2ABA To: Sean Eric Fagan , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201902072151.x17Lpdok089600@repo.freebsd.org> From: Bryan Drewery Openpgp: preference=signencrypt Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAG0JEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPokBVwQTAQoAQQIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBPkXPLLDqup6XIofCTXXcbtuRpfPBQJb5hLu BQkNPvODAAoJEDXXcbtuRpfP9rMH/3f7cfX5rzyEV5QNfV/wS4jFukLoPZ4+nCM/TKxH3pEX 2bLbeQbkk6La8cueQ5Lpoht5XFZ18Y5TbMittngltrlNzoDD0h9are24OkDFGim3afJU7tkj IGQa1if+re+vI5BhzYwRhj0oKXzBi39M5oePd3L1dXfx83rg2FPyZBdIejsz6fR74T3JVkbd 6k2l5/3Zk2uiNMy+eBfDRgYE1E6CP28kV0nCeGKZgSVso0kGUUHud7voKqGVpMvbd0mE4pp4 PE5YJaFPjrll9miaDAvdU8LGIq5n6+aXPLKoQ/QNl6mg6ifgI6FfKILOkTizLW8E5PBSNnCm NapQ55yjm125AQ0EUmmGawEIAKJUU9+Q19oW1RK5jTf3m56j+szIc8Y9DaLC8REUKl4UZJBK BqCl6c0cukVApOD92XoU6hJPm2rLEyp/IcYcPPNTnVu8D8h9oag2L8EiFN7+2hk0xG+lwjc8 uOIZycme7AIJsBU4AZ1v63lxm2k104hwpiatgbe71GIGl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bDqXaXm6YC4s0jVOf1+MljeQIsbHPVQZ0IRigCpzCDSUFTK QOebA9iUj8JaF2DPwd6sjyUUv/XMCLl+SwzSijmVN0Kfk85XspzNef8XmteKK1mERkYnLWBw TNwp6qezg/CukNbobNH08ciT+z2fxtPuwqK5X9Q5R4Q7egth5XUTxbwLwIJerEfVs4HG+687 m9h1bWyYJemB24MgBu8fTaVxas8dSSwDHabdgyGMKIvqDHUUJQSMDbio0Iwhs7lx2p3Xd5Br wQLMiaUPnKBHqfVM8ADWldvHF6xa9keBUjnEedKwQNjYf76lGH6bLwbyZcLigKFdXY1R2ooT Xi+R Organization: FreeBSD Message-ID: <5ff60936-45d0-3aa8-0b1b-e937e5639da4@FreeBSD.org> Date: Thu, 7 Feb 2019 14:00:48 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <201902072151.x17Lpdok089600@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SFojDR4AseoYI3eXnL3yNdbd0WjzVvtfO" X-Rspamd-Queue-Id: D4AB076170 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 22:00:57 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SFojDR4AseoYI3eXnL3yNdbd0WjzVvtfO Content-Type: multipart/mixed; boundary="AGmTCOVb2l7uCpbLmRJQUtoaPtxAvk8Rm"; protected-headers="v1" From: Bryan Drewery To: Sean Eric Fagan , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <5ff60936-45d0-3aa8-0b1b-e937e5639da4@FreeBSD.org> Subject: Re: svn commit: r343881 - head/lib/libutil References: <201902072151.x17Lpdok089600@repo.freebsd.org> In-Reply-To: <201902072151.x17Lpdok089600@repo.freebsd.org> --AGmTCOVb2l7uCpbLmRJQUtoaPtxAvk8Rm Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2/7/19 1:51 PM, Sean Eric Fagan wrote: > Author: sef > Date: Thu Feb 7 21:51:39 2019 > New Revision: 343881 > URL: https://svnweb.freebsd.org/changeset/base/343881 >=20 > Log: > r339008 broke repquota for UFS. This rectifies that. > =20 > Refactor the function calls and tests so that, on UFS, the proper fie= lds > are filled out. > =20 > PR: 233849 > Reported by: Andre Albsmeier > Reviewed by: mav, delphij > MFC after: 1 month > Sponsored by: iXsystems Inc > Differential Revision: https://reviews.freebsd.org/D18785 >=20 > Modified: > head/lib/libutil/quotafile.c >=20 > Modified: head/lib/libutil/quotafile.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libutil/quotafile.c Thu Feb 7 21:41:27 2019 (r343880) > +++ head/lib/libutil/quotafile.c Thu Feb 7 21:51:39 2019 (r343881) > @@ -119,6 +119,7 @@ quota_open(struct fstab *fs, int quotatype, int ope= nfl > struct group *grp; > struct stat st; > int qcmd, serrno; > + int ufs; > =20 > if ((qf =3D calloc(1, sizeof(*qf))) =3D=3D NULL) > return (NULL); > @@ -129,15 +130,21 @@ quota_open(struct fstab *fs, int quotatype, int o= penfl > goto error; > qf->dev =3D st.st_dev; > qcmd =3D QCMD(Q_GETQUOTASIZE, quotatype); > + ufs =3D strcmp(fs->fs_vfstype, "ufs") =3D=3D 0; > + /* > + * On UFS, hasquota() fills in qf->qfname. But we only care about > + * this for UFS. So we need to call hasquota() for UFS, first. > + */ > + if (ufs) { > + serrno =3D hasquota(fs, quotatype, qf->qfname, > + sizeof(qf->qfname)); > + } > if (quotactl(qf->fsname, qcmd, 0, &qf->wordsize) =3D=3D 0) > return (qf); > - /* We only check the quota file for ufs */ > - if (strcmp(fs->fs_vfstype, "ufs")) { > + if (!ufs) { > errno =3D 0; > goto error; > - } > - serrno =3D hasquota(fs, quotatype, qf->qfname, sizeof(qf->qfname)); > - if (serrno =3D=3D 0) { > + } else if (serrno =3D=3D 0) { > errno =3D EOPNOTSUPP; > goto error; > } >=20 /usr/src/lib/libutil/quotafile.c:121: warning: 'serrno' may be used uninitialized in this function --=20 Regards, Bryan Drewery --AGmTCOVb2l7uCpbLmRJQUtoaPtxAvk8Rm-- --SFojDR4AseoYI3eXnL3yNdbd0WjzVvtfO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE+Rc8ssOq6npcih8JNddxu25Gl88FAlxcqpEACgkQNddxu25G l89rLwf/aJEccgXhp/U3vGVYi/YZ53GKi2/0icwxZRtLb6E0QTetfeP6mLH6qJyM KJrVwe9V4zBaYbG2S54PUH0OsleM9r8HUkBD1tECdme4Cbq3brHmfoo4LJqmEBcU eZVwMi68Ri/CI+3Ht4yG8vxPnn/TJ0QzbvbfKlOtiKtu8fs5Kn0LE9JhaTK3RVX5 NVDDnv7pGLEBQeVNf4USL2EsRCyYrWcJbpiN2YoBN/0HZClEEWm1CENRKMNcdST8 AmQZP7g8pIX3nZWjT3774VsFQ80TC8vQ1J3MzciTrwO2hKg90pJcloYm9iZR4ovx smP/GwAkA8eNmU6SDjxSsQunikIgzA== =r49E -----END PGP SIGNATURE----- --SFojDR4AseoYI3eXnL3yNdbd0WjzVvtfO--