mirror of
https://github.com/troglobit/finit.git
synced 2026-11-17 19:30:29 +00:00
tmpfiles: add -d,--debug mode
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 file changed
+7
-1
+7
-1
@@ -541,6 +541,7 @@ static int usage(int rc)
|
|||||||
"\n"
|
"\n"
|
||||||
"Commands:\n"
|
"Commands:\n"
|
||||||
" -c, --create Create files and directories\n"
|
" -c, --create Create files and directories\n"
|
||||||
|
" -d, --debug Show developer debug messages\n"
|
||||||
" -r, --remove Remove files and directories marked for removal\n"
|
" -r, --remove Remove files and directories marked for removal\n"
|
||||||
" -h, --help This help text\n"
|
" -h, --help This help text\n"
|
||||||
"\n");
|
"\n");
|
||||||
@@ -552,6 +553,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
struct option long_options[] = {
|
struct option long_options[] = {
|
||||||
{ "create", 0, NULL, 'c' },
|
{ "create", 0, NULL, 'c' },
|
||||||
|
{ "debug", 0, NULL, 'd' },
|
||||||
{ "remove", 0, NULL, 'r' },
|
{ "remove", 0, NULL, 'r' },
|
||||||
{ "help", 0, NULL, 'h' },
|
{ "help", 0, NULL, 'h' },
|
||||||
{ NULL, 0, NULL, 0 }
|
{ NULL, 0, NULL, 0 }
|
||||||
@@ -559,12 +561,16 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
while ((c = getopt_long(argc, argv, "crh?", long_options, NULL)) != EOF) {
|
while ((c = getopt_long(argc, argv, "cdrh?", long_options, NULL)) != EOF) {
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case 'c':
|
case 'c':
|
||||||
c_flag = 1;
|
c_flag = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'd':
|
||||||
|
debug = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'r':
|
case 'r':
|
||||||
r_flag = 1;
|
r_flag = 1;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in new issue
Block a user