Date: Tue, 17 Feb 2009 18:24:59 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r188723 - head/sys/geom/part Message-ID: <200902171824.n1HIOx3D023567@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Tue Feb 17 18:24:58 2009 New Revision: 188723 URL: http://svn.freebsd.org/changeset/base/188723 Log: Add a default implementation for pre-check. It should always succeed if not implemented. Pointy hat: marcel Modified: head/sys/geom/part/g_part_if.m Modified: head/sys/geom/part/g_part_if.m ============================================================================== --- head/sys/geom/part/g_part_if.m Tue Feb 17 17:46:43 2009 (r188722) +++ head/sys/geom/part/g_part_if.m Tue Feb 17 18:24:58 2009 (r188723) @@ -1,5 +1,5 @@ #- -# Copyright (c) 2006-2008 Marcel Moolenaar +# Copyright (c) 2006-2009 Marcel Moolenaar # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,6 +40,16 @@ INTERFACE g_part; +# Default implementations of methods. +CODE { + static int + default_precheck(struct g_part_table *t __unused, + enum g_part_ctl r __unused, struct g_part_parms *p __unused) + { + return (0); + } +}; + # add() - scheme specific processing for the add verb. METHOD int add { struct g_part_table *table; @@ -106,7 +116,7 @@ METHOD int precheck { struct g_part_table *table; enum g_part_ctl req; struct g_part_parms *gpp; -}; +} DEFAULT default_precheck; # probe() - probe the provider attached to the given consumer for the # existence of the scheme implemented by the G_PART interface handler.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902171824.n1HIOx3D023567>