svn commit: r274661 - in head/sys: conf geom/part modules/geom/geom_part/geom_part_bsd
Andrey V. Elsukov
ae at FreeBSD.org
Wed Nov 19 16:16:45 UTC 2014
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
>
> 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 = (struct g_part_bsd_table *)basetable;
> + p = table->bbarea + pp->sectorsize;
> + return (bsd_disklabel_le_dec(p, data, MAXPARTITIONS));
Probably you need to use basetable->gpt_entries here instead of
MAXPARTITIONS.
--
WBR, Andrey V. Elsukov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20141119/993087e4/attachment.sig>
More information about the svn-src-all
mailing list