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
signature.asc
Description: OpenPGP digital signature