~ubuntu-branches/ubuntu/breezy/lvm2/breezy

« back to all changes in this revision

Viewing changes to tools/vgmknodes.c

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Caulfield
  • Date: 2004-11-03 09:37:56 UTC
  • Revision ID: james.westby@ubuntu.com-20041103093756-jt0nj8z0v8k1lyiv
Tags: upstream-2.00.25
ImportĀ upstreamĀ versionĀ 2.00.25

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2003-2004 Sistina Software, Inc. All rights reserved. 
 
3
 * Copyright (C) 2004 Red Hat, Inc. All rights reserved.
 
4
 *
 
5
 * This file is part of LVM2.
 
6
 *
 
7
 * This copyrighted material is made available to anyone wishing to use,
 
8
 * modify, copy, or redistribute it subject to the terms and conditions
 
9
 * of the GNU General Public License v.2.
 
10
 *
 
11
 * You should have received a copy of the GNU General Public License
 
12
 * along with this program; if not, write to the Free Software Foundation,
 
13
 * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
14
 */
 
15
 
 
16
#include "tools.h"
 
17
 
 
18
static int _vgmknodes_single(struct cmd_context *cmd, struct logical_volume *lv,
 
19
                             void *handle)
 
20
{
 
21
        if (!lv_mknodes(cmd, lv))
 
22
                return ECMD_FAILED;
 
23
 
 
24
        return ECMD_PROCESSED;
 
25
}
 
26
 
 
27
int vgmknodes(struct cmd_context *cmd, int argc, char **argv)
 
28
{
 
29
        int r;
 
30
 
 
31
        r = process_each_lv(cmd, argc, argv, LCK_VG_READ, NULL,
 
32
                            &_vgmknodes_single);
 
33
 
 
34
        if (!lv_mknodes(cmd, NULL) && (r < ECMD_FAILED))
 
35
                r = ECMD_FAILED;
 
36
 
 
37
        return r;
 
38
}