diff options
author | Colin Walters <walters@verbum.org> | 2011-11-14 15:39:38 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2011-11-14 15:39:38 -0500 |
commit | 18f0b537a45f12852e4ec6b174440cbfe7702e4d (patch) | |
tree | e8535cb5fe66add1c8725db4a50953aebd8159e9 /src/libotutil/ot-opt-utils.c | |
parent | 9dc6ddce0848cf04b76fc1c673c8fc1a0f6f425a (diff) | |
download | ostree-18f0b537a45f12852e4ec6b174440cbfe7702e4d.tar.gz |
build: Move sources into src/ again
This is necessary if we want to build when srcdir == builddir,
otherwise we blow up because "ostree" is a source directory and a
binary.
Diffstat (limited to 'src/libotutil/ot-opt-utils.c')
-rw-r--r-- | src/libotutil/ot-opt-utils.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/libotutil/ot-opt-utils.c b/src/libotutil/ot-opt-utils.c new file mode 100644 index 00000000..750e5b66 --- /dev/null +++ b/src/libotutil/ot-opt-utils.c @@ -0,0 +1,38 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- + * + * Copyright (C) 2011 Colin Walters <walters@verbum.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Colin Walters <walters@verbum.org> + */ + +#include "config.h" + +#include <gio/gio.h> + +#include <string.h> + +#include "otutil.h" + +void +ot_util_usage_error (GOptionContext *context, const char *message, GError **error) +{ + gchar *help = g_option_context_get_help (context, TRUE, NULL); + g_printerr ("%s\n", help); + g_free (help); + g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, message); +} |