devicename_stubs.c revision 235329
1215334Sdougb/*-
21638Srgrimes * Copyright (c) 2012 Andriy Gapon <avg@FreeBSD.org>
31638Srgrimes * All rights reserved.
41638Srgrimes *
51638Srgrimes * Redistribution and use in source and binary forms, with or without
61638Srgrimes * modification, are permitted provided that the following conditions
71638Srgrimes * are met:
81638Srgrimes * 1. Redistributions of source code must retain the above copyright
91638Srgrimes *    notice, this list of conditions and the following disclaimer.
101638Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111638Srgrimes *    notice, this list of conditions and the following disclaimer in the
121638Srgrimes *    documentation and/or other materials provided with the distribution.
131638Srgrimes *
141638Srgrimes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
151638Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
161638Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
171638Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
181638Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
191638Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
201638Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
211638Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
221638Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
231638Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
241638Srgrimes * SUCH DAMAGE.
251638Srgrimes */
261638Srgrimes
271638Srgrimes#include <sys/cdefs.h>
281638Srgrimes__FBSDID("$FreeBSD: head/sys/boot/zfs/devicename_stubs.c 235329 2012-05-12 09:03:30Z avg $");
291638Srgrimes
301638Srgrimes#include <stand.h>
311638Srgrimes#include "libzfs.h"
321638Srgrimes
331638Srgrimes__attribute__((weak))
341638Srgrimesint
351638Srgrimeszfs_parsedev(struct zfs_devdesc *dev, const char *devspec, const char **path)
361638Srgrimes{
371638Srgrimes	return (EINVAL);
381638Srgrimes}
391638Srgrimes
401638Srgrimes__attribute__((weak))
411638Srgrimeschar *
421638Srgrimeszfs_fmtdev(void *vdev)
431638Srgrimes{
441638Srgrimes    static char	buf[128];
451638Srgrimes
461638Srgrimes    return (buf);
471638Srgrimes}
481638Srgrimes