Date: Wed, 19 Nov 2014 19:16:05 +0300 From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: Warner Losh <imp@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r274661 - in head/sys: conf geom/part modules/geom/geom_part/geom_part_bsd Message-ID: <546CC245.3070700@FreeBSD.org> In-Reply-To: <201411181706.sAIH6eS9051888@svn.freebsd.org> References: <201411181706.sAIH6eS9051888@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mJD2FBaJ7rG4QxWIVCVbO9iknWmB85XSn Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 18.11.2014 20:06, Warner Losh wrote: > Author: imp > Date: Tue Nov 18 17:06:40 2014 > New Revision: 274661 > URL: https://svnweb.freebsd.org/changeset/base/274661 >=20 > Log: > Implement the historic DIOCGDINFO ioctl for gpart on BSD > partitions. Several utilities still use this interface and require > additional information since gpart was activated than before. This > allows fsck of a UFS partition without having to specify it is UFS, > per historic behavior. > + */ > +static int > +g_part_bsd_ioctl(struct g_part_table *basetable, struct g_provider *pp= , > + u_long cmd, void *data, int fflag, struct thread *td) > +{ > + > + switch (cmd) > + { > + case DIOCGDINFO: > + { > + struct g_part_bsd_table *table; > + u_char *p; > + > + table =3D (struct g_part_bsd_table *)basetable; > + p =3D table->bbarea + pp->sectorsize; > + return (bsd_disklabel_le_dec(p, data, MAXPARTITIONS)); Probably you need to use basetable->gpt_entries here instead of MAXPARTITIONS. --=20 WBR, Andrey V. Elsukov --mJD2FBaJ7rG4QxWIVCVbO9iknWmB85XSn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJUbMJMAAoJEAHF6gQQyKF6bsQH/1FFOt+OU1co7aLKZjmpuSun x/mP9SBWw6aCooxn50txoFUKi7KqczgwjB/7+stmkm7LPRfzLYY9nQvrAWjwpp/l 4gcSW+KscQZTliruiH9PeBdy2OZONX82emoXqAM8fiYqPWJG4bfPn4txFDwvMUD1 MC5lZtaUd5lDaKtwY8qher151Z10WDmLwNOGB7/oelv37k9UuwSWGnKecetirjw7 uRDEzMjbBDLaMgDAMnrfWmrkun3x99DPlF8T+pwqeb2kNLPE4tD2l7lRLBDL6a5j VtcGmeng45EHtMwGSu0BemU7zmTkvh++Vov9lkHZR0YK8fruWWyWAJLBgg+uexc= =HGO7 -----END PGP SIGNATURE----- --mJD2FBaJ7rG4QxWIVCVbO9iknWmB85XSn--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?546CC245.3070700>