]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - libdisk/xvm.c
allow us to link with libefence for qa runs again.
[thirdparty/xfsprogs-dev.git] / libdisk / xvm.c
CommitLineData
f937adac
NS
1/*
2 * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it would be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 *
12 * Further, this software is distributed without any warranty that it is
13 * free of the rightful claim of any third person regarding infringement
14 * or the like. Any license provided herein, whether implied or
15 * otherwise, applies only to this software file. Patent licenses, if
16 * any, provided herein do not apply to combinations of this program with
17 * other software, or any other product whatsoever.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write the Free Software Foundation, Inc., 59
21 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
22 *
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
25 *
26 * http://www.sgi.com
27 *
28 * For further information regarding this notice, see:
29 *
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
31 */
32
33#include <stdio.h>
34#include <fcntl.h>
35#include <unistd.h>
36#include <sys/stat.h>
37#include <sys/ioctl.h>
38#include <volume.h>
39#include "xvm.h"
40
41static int
42mnt_is_xvm_subvol(dev_t dev)
43{
44 /* TODO - DeanJ? - for now, always return false */
45 return 0;
46}
47
48/*
49 * If the logical device is a xvm striped volume, then it returns the
50 * stripe unit and stripe width information.
51 * Input parameters: the logical volume
52 * the subvolume type - (SVTYPE_RT or
53 * SVTYPE_DATA)
54 * Output parameters: the stripe unit and width in 512 byte blocks
55 * true/false - was this device an XVM volume?
56 */
57int
58xvm_get_subvol_stripe(
59 char *dev,
60 sv_type_t type,
61 int *sunit,
62 int *swidth,
63 struct stat64 *sb)
64{
8e9bef16
NS
65 if (!mnt_is_xvm_subvol(sb->st_dev))
66 return 0;
67
f937adac 68 /* TODO - DeanJ? - for now, always return false */
8e9bef16
NS
69
70 return 0;
f937adac 71}