4 * Copyright (C) 2004 Red Hat, Inc. All rights reserved.
6 * This file is part of LVM2.
8 * This copyrighted material is made available to anyone wishing to use,
9 * modify, copy, or redistribute it subject to the terms and conditions
10 * of the GNU General Public License v.2.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software Foundation,
14 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 /* All output gets passed to this function line-by-line */
20 void test_log_fn(int level
, int dm_errno
, const char *file
, int line
,
23 /* Extract and process output here rather than printing it */
28 printf("%s\n", format
);
32 int main(int argc
, char **argv
)
37 lvm2_log_fn(test_log_fn
);
41 lvm2_log_level(handle
, 1);
42 r
= lvm2_run(handle
, "vgs --noheadings vg1");
44 /* More commands here */