Re: [PATCH 11/11] xfsprogs: Add a way to compile without blkid

Jan Tulak
2015-08-18T08:00:13Z

[-- Attachment #1.1: Type: text/plain, Size: 1551 bytes --]

On Mon, Aug 17, 2015 at 9:39 PM, Christoph Hellwig <hch@infradead.org>
wrote:

> On Mon, Aug 17, 2015 at 06:23:26PM +0200, Jan Tulak wrote:
> > UPDATE: default to "signature found", so without blkid is
> > -f mandatory.
>
> Belongs in the cover letter, not this patch.
>

I forgot to remove it from the patch, sorry for that.

>
> > } else
> > ft->psectorsize = ft->lsectorsize = BBSIZE;
> > } else {
> > +#ifdef ENABLE_BLKID
> > blkid_get_topology(dfile, &ft->dsunit, &ft->dswidth,
> > &ft->lsectorsize, &ft->psectorsize,
> > force_overwrite);
> > +#endif /* ENABLE_BLKID */
> > }
> >
> > if (xi->rtname && !xi->risfile) {
> > int sunit, lsectorsize, psectorsize;
> >
> > +#ifdef ENABLE_BLKID
> > blkid_get_topology(xi->rtname, &sunit, &ft->rtswidth,
> > &lsectorsize, &psectorsize,
> force_overwrite);
> > +#endif /* ENABLE_BLKID */
>
> I think you need to proide a dummy blkid_get_topology which at least
> sets the two sector sizes to 512.
>

I don't think so. blkid_get_topology is used only for block devices, not
when mkfs-ing a file. And there are multiple further issues with mkfs
on OS X with system calls, so such dummy call would be for no use.

Although, when I think about it, removing few ifdef would certainly make
the code
cleaner, so I think I can make a dummy call for this reason.

Cheers,
Jan

--
Jan Tulak
jtulak@redhat.com

[-- Attachment #1.2: Type: text/html, Size: 2576 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]