summaryrefslogtreecommitdiff
path: root/tools/errors.h
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2013-07-06 03:28:21 +0100
committerAlasdair G Kergon <agk@redhat.com>2013-07-06 03:28:21 +0100
commit7c6526aae277c049aa4a6e41b7c2b30d366c9852 (patch)
treeed387b4dc960f6f41be509336d6cdd64eaca25e4 /tools/errors.h
parenta64239f225463d418dd4ccb931ceda88535fc6e2 (diff)
downloadlvm2-7c6526aae277c049aa4a6e41b7c2b30d366c9852.tar.gz
lvresize: separate validation from action
Start separating the validation from the action in the basic lvresize code moved to the library. Remove incorrect use of command line error codes from lvresize library functions. Move errors.h to tools directory to reinforce this, exporting public versions of the error codes in lvm2cmd.h for dmeventd plugins to use.
Diffstat (limited to 'tools/errors.h')
-rw-r--r--tools/errors.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/errors.h b/tools/errors.h
new file mode 100644
index 000000000..a644fc7ed
--- /dev/null
+++ b/tools/errors.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
+ * Copyright (C) 2004 Red Hat, Inc. All rights reserved.
+ *
+ * This file is part of LVM2.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License v.2.1.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _LVM_ERRORS_H
+#define _LVM_ERRORS_H
+
+#define ECMD_PROCESSED 1
+#define ENO_SUCH_CMD 2
+#define EINVALID_CMD_LINE 3
+#define ECMD_FAILED 5
+
+/* FIXME Also returned by cmdlib. */
+
+#endif