tmpfiles: add -d,--debug mode

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2025-07-06 03:28:02 +02:00
1 parent 7d4603e13b
commit 58d48b54b3
1 file changed
+7 -1
+7 -1
View File
@@ -541,6 +541,7 @@ static int usage(int rc)
"\n"
"Commands:\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"
" -h, --help This help text\n"
"\n");
@@ -552,6 +553,7 @@ int main(int argc, char *argv[])
{
struct option long_options[] = {
{ "create", 0, NULL, 'c' },
{ "debug", 0, NULL, 'd' },
{ "remove", 0, NULL, 'r' },
{ "help", 0, NULL, 'h' },
{ NULL, 0, NULL, 0 }
@@ -559,12 +561,16 @@ int main(int argc, char *argv[])
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) {
case 'c':
c_flag = 1;
break;
case 'd':
debug = 1;
break;
case 'r':
r_flag = 1;
break;