[parted-devel] [PATCH] libparted: add nilfs2 module

Petr Uzel petr.uzel at suse.cz
Mon Mar 7 14:22:02 UTC 2011


On Sat, Mar 05, 2011 at 07:50:04PM +0100, Jim Meyering wrote:
> Jiro SEKIBA wrote:
> 
> > Hi,
> >
> > This is a new fs module to provide following:
> > - probe nilfs2 filesystem partition
> > - clobber nilfs2 filesystem partition
> >

.... snip ....

> +
> +#ifndef DISCOVER_ONLY
> +static int
> +nilfs2_clobber (PedGeometry* geom)
> +{
> +	char buf[512];
> +	int ret[2];
> +
> +	printf("nilfs2_clobber\n");

This looks like a leftover after debugging...

> +	memset (buf, 0, 512);
> +
> +	ret[0] = ped_geometry_write (geom, buf, NILFS_SB_OFFSET, 1);
> +	ret[1] = ped_geometry_write (geom, buf,
> +				     NILFS_SB2_OFFSET(geom->length), 1);
> +
> +	return ret[0]|ret[1];
> +}
> +#endif /* !DISCOVER_ONLY */
> +
> +static PedFileSystemOps nilfs2_ops = {
> +	probe:			nilfs2_probe,
> +#ifndef DISCOVER_ONLY
> + #if 0
> +	clobber:		nilfs2_clobber,
> + #else
> +	clobber:		NULL,
> + #endif

Dtto. And this causes parted not to compile with -Wall (as -Werror
added by default):

libtool: compile:  gcc -std=gnu99 -I. -I../../../lib -I../../../include -ggdb -O0 -Wall -Werror -MT nilfs2.lo -MD -MP -MF .deps/nilfs2.Tpo -c nilfs2.c -o nilfs2.o
cc1: warnings being treated as errors
nilfs2.c:142:1: error: 'nilfs2_clobber' defined but not used
make[4]: *** [nilfs2.lo] Error 1

> +#else
> +	clobber:		NULL,
> +#endif
> +	open:			NULL,
> +	create:			NULL,
> +	close:			NULL,

Petr

--
Petr Uzel
IRC: ptr_uzl @ freenode
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20110307/c4fa2a03/attachment.pgp>


More information about the parted-devel mailing list