xfs
[Top] [All Lists]

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

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 11/11] xfsprogs: Add a way to compile without blkid
From: Jan Tulak <jtulak@xxxxxxxxxx>
Date: Tue, 18 Aug 2015 09:59:51 +0200
Cc: xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20150817193913.GD8444@xxxxxxxxxxxxx>
References: <1439828606-7886-1-git-send-email-jtulak@xxxxxxxxxx> <1439828606-7886-12-git-send-email-jtulak@xxxxxxxxxx> <20150817193913.GD8444@xxxxxxxxxxxxx>
On Mon, Aug 17, 2015 at 9:39 PM, Christoph Hellwig <hch@xxxxxxxxxxxxx> 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

--
<Prev in Thread] Current Thread [Next in Thread>