diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-28 09:24:13 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-28 09:24:13 -0500 |
commit | 84b7e98b805b86e4d63e2ce38a490e86541ed0da (patch) | |
tree | 1de28d332cb63886a4d9b2e674a8bff453d13f75 | |
parent | 50d5571b30e05d852ef219ba5d9bf64c12b4e9f0 (diff) | |
download | horizon-84b7e98b805b86e4d63e2ce38a490e86541ed0da.tar.gz horizon-84b7e98b805b86e4d63e2ce38a490e86541ed0da.tar.bz2 horizon-84b7e98b805b86e4d63e2ce38a490e86541ed0da.tar.xz horizon-84b7e98b805b86e4d63e2ce38a490e86541ed0da.zip |
hscript: Make line a long for alignment
-rw-r--r-- | hscript/disk.cc | 3 | ||||
-rw-r--r-- | hscript/key.hh | 6 | ||||
-rw-r--r-- | hscript/script.cc | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/hscript/disk.cc b/hscript/disk.cc index aafa08c..3de34e1 100644 --- a/hscript/disk.cc +++ b/hscript/disk.cc @@ -38,7 +38,8 @@ using namespace Horizon::Keys; * @returns true if _block is valid, false otherwise. * @note Will output_error if an error occurs. */ -bool is_block_device(const std::string &key, int line, const std::string &_block) { +bool is_block_device(const std::string &key, long line, + const std::string &_block) { struct stat blk_stat; const char *block_c = _block.c_str(); if(access(block_c, F_OK) != 0 || stat(block_c, &blk_stat) != 0) { diff --git a/hscript/key.hh b/hscript/key.hh index 786df2d..0a53124 100644 --- a/hscript/key.hh +++ b/hscript/key.hh @@ -26,8 +26,8 @@ namespace Keys { class Key { protected: /*! The line number where this Key appeared. */ - int line; - Key(int _line) : line(_line) {} + long line; + Key(long _line) : line(_line) {} public: virtual ~Key(); @@ -56,7 +56,7 @@ public: */ virtual bool execute(ScriptOptions) const = 0; - int lineno() const { return this->line; } + long lineno() const { return this->line; } }; diff --git a/hscript/script.cc b/hscript/script.cc index 5849296..3815d1c 100644 --- a/hscript/script.cc +++ b/hscript/script.cc @@ -570,7 +570,7 @@ int validate_one_account(const std::string &name, UserDetail *detail, /* REQ: Runner.Validate.userpw.None */ if(!detail->passphrase) { - int line = detail->name->lineno(); + long line = detail->name->lineno(); output_warning("installfile:" + std::to_string(line), "username: " + name + " has no set passphrase", "This account will not be able to log in."); |