summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2006-02-06 10:17:32 +0000
committerRoger Leigh <rleigh@debian.org>2006-02-06 10:17:32 +0000
commit2d8a4736f54342b1687cc080b6788f4780c33d29 (patch)
tree61271c0ffc247863b9e21f47f13a3bc6e37ab680
parent2188080070917f1f719ecb31248b0c53e575d7d9 (diff)
downloadschroot-2d8a4736f54342b1687cc080b6788f4780c33d29.tar.gz
* Rename schroot::Options to schroot::options.
-rw-r--r--schroot/schroot-options.cc6
-rw-r--r--schroot/schroot-options.h6
-rw-r--r--schroot/schroot.cc24
3 files changed, 18 insertions, 18 deletions
diff --git a/schroot/schroot-options.cc b/schroot/schroot-options.cc
index 1c59ddad..59032911 100644
--- a/schroot/schroot-options.cc
+++ b/schroot/schroot-options.cc
@@ -42,7 +42,7 @@ using namespace schroot;
*
* Returns a structure containing the options.
*/
-Options::Options(int argc,
+options::options(int argc,
char *argv[]):
action(ACTION_SESSION_AUTO),
chroots(),
@@ -260,12 +260,12 @@ Options::Options(int argc,
}
}
-Options::~Options()
+options::~options()
{
}
void
-Options::set_action (action_type action)
+options::set_action (action_type action)
{
if (this->action != ACTION_SESSION_AUTO)
throw opt::validation_error(_("Only one action may be specified"));
diff --git a/schroot/schroot-options.h b/schroot/schroot-options.h
index d36e4f78..adafd9b8 100644
--- a/schroot/schroot-options.h
+++ b/schroot/schroot-options.h
@@ -32,7 +32,7 @@ namespace schroot
/**
* schroot command-line options.
*/
- class Options
+ class options
{
public:
/// The action to perform.
@@ -55,11 +55,11 @@ namespace schroot
* @param argc the number of arguments.
* @param argv the list of arguments.
*/
- Options(int argc,
+ options(int argc,
char *argv[]);
/// The destructor.
- virtual ~Options();
+ virtual ~options();
/// The action to perform.
action_type action;
diff --git a/schroot/schroot.cc b/schroot/schroot.cc
index ce1230d6..b89cb404 100644
--- a/schroot/schroot.cc
+++ b/schroot/schroot.cc
@@ -55,7 +55,7 @@ print_version (std::ostream& stream)
/*
* get_chroot_options:
* @config: an #sbuild::chroot_config
- * @options: an #schroot::Options
+ * @options: an #schroot::options
*
* Get a list of chroots based on the specified options (--all, --chroot).
*
@@ -63,7 +63,7 @@ print_version (std::ostream& stream)
*/
sbuild::string_list
get_chroot_options(std::tr1::shared_ptr<sbuild::chroot_config>& config,
- schroot::Options& options)
+ schroot::options& options)
{
sbuild::string_list ret;
@@ -133,9 +133,9 @@ main (int argc,
openlog("schroot", LOG_PID|LOG_NDELAY, LOG_AUTHPRIV);
/* Parse command-line options into opt structure. */
- Options options(argc, argv);
+ options options(argc, argv);
- if (options.action == Options::ACTION_VERSION)
+ if (options.action == options::ACTION_VERSION)
{
print_version(std::cout);
exit(EXIT_SUCCESS);
@@ -171,7 +171,7 @@ main (int argc,
}
/* Print chroot list (including aliases). */
- if (options.action == Options::ACTION_LIST)
+ if (options.action == options::ACTION_LIST)
{
config->print_chroot_list(std::cout);
exit(EXIT_SUCCESS);
@@ -189,18 +189,18 @@ main (int argc,
}
/* Print chroot information for specified chroots. */
- if (options.action == Options::ACTION_INFO)
+ if (options.action == options::ACTION_INFO)
{
config->print_chroot_info(chroots, std::cout);
exit (EXIT_SUCCESS);
}
- if (options.action == Options::ACTION_CONFIG)
+ if (options.action == options::ACTION_CONFIG)
{
config->print_chroot_config(chroots, std::cout);
exit (EXIT_SUCCESS);
}
- if (options.action == Options::ACTION_SESSION_BEGIN &&
+ if (options.action == options::ACTION_SESSION_BEGIN &&
chroots.size() != 1)
{
sbuild::log_error()
@@ -211,13 +211,13 @@ main (int argc,
/* Create a session. */
sbuild::session::operation sess_op(sbuild::session::OPERATION_AUTOMATIC);
- if (options.action == Options::ACTION_SESSION_BEGIN)
+ if (options.action == options::ACTION_SESSION_BEGIN)
sess_op = sbuild::session::OPERATION_BEGIN;
- else if (options.action == Options::ACTION_SESSION_RECOVER)
+ else if (options.action == options::ACTION_SESSION_RECOVER)
sess_op = sbuild::session::OPERATION_RECOVER;
- else if (options.action == Options::ACTION_SESSION_RUN)
+ else if (options.action == options::ACTION_SESSION_RUN)
sess_op = sbuild::session::OPERATION_RUN;
- else if (options.action == Options::ACTION_SESSION_END)
+ else if (options.action == options::ACTION_SESSION_END)
sess_op = sbuild::session::OPERATION_END;
sbuild::session session("schroot", config, sess_op, chroots);